Class: Google::Cloud::Retail::V2::SearchResponse::Facet
- Inherits:
-
Object
- Object
- Google::Cloud::Retail::V2::SearchResponse::Facet
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/cloud/retail/v2/search_service.rb
Overview
A facet result.
Defined Under Namespace
Classes: FacetValue
Instance Attribute Summary collapse
-
#dynamic_facet ⇒ ::Boolean
Whether the facet is dynamically generated.
-
#key ⇒ ::String
The key for this facet.
-
#values ⇒ ::Array<::Google::Cloud::Retail::V2::SearchResponse::Facet::FacetValue>
The facet values for this field.
Instance Attribute Details
#dynamic_facet ⇒ ::Boolean
Returns Whether the facet is dynamically generated.
922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 |
# File 'proto_docs/google/cloud/retail/v2/search_service.rb', line 922 class Facet include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A facet value which contains value names and their count. # @!attribute [rw] value # @return [::String] # Text value of a facet, such as "Black" for facet "colorFamilies". # @!attribute [rw] interval # @return [::Google::Cloud::Retail::V2::Interval] # Interval value for a facet, such as [10, 20) for facet "price". # @!attribute [rw] count # @return [::Integer] # Number of items that have this facet value. # @!attribute [rw] min_value # @return [::Float] # The minimum value in the # {::Google::Cloud::Retail::V2::SearchResponse::Facet::FacetValue#interval FacetValue.interval}. # Only supported on numerical facets and returned if # {::Google::Cloud::Retail::V2::SearchRequest::FacetSpec::FacetKey#return_min_max SearchRequest.FacetSpec.FacetKey.return_min_max} # is true. # @!attribute [rw] max_value # @return [::Float] # The maximum value in the # {::Google::Cloud::Retail::V2::SearchResponse::Facet::FacetValue#interval FacetValue.interval}. # Only supported on numerical facets and returned if # {::Google::Cloud::Retail::V2::SearchRequest::FacetSpec::FacetKey#return_min_max SearchRequest.FacetSpec.FacetKey.return_min_max} # is true. class FacetValue include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#key ⇒ ::String
Returns The key for this facet. E.g., "colorFamilies" or "price" or "attributes.attr1".
922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 |
# File 'proto_docs/google/cloud/retail/v2/search_service.rb', line 922 class Facet include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A facet value which contains value names and their count. # @!attribute [rw] value # @return [::String] # Text value of a facet, such as "Black" for facet "colorFamilies". # @!attribute [rw] interval # @return [::Google::Cloud::Retail::V2::Interval] # Interval value for a facet, such as [10, 20) for facet "price". # @!attribute [rw] count # @return [::Integer] # Number of items that have this facet value. # @!attribute [rw] min_value # @return [::Float] # The minimum value in the # {::Google::Cloud::Retail::V2::SearchResponse::Facet::FacetValue#interval FacetValue.interval}. # Only supported on numerical facets and returned if # {::Google::Cloud::Retail::V2::SearchRequest::FacetSpec::FacetKey#return_min_max SearchRequest.FacetSpec.FacetKey.return_min_max} # is true. # @!attribute [rw] max_value # @return [::Float] # The maximum value in the # {::Google::Cloud::Retail::V2::SearchResponse::Facet::FacetValue#interval FacetValue.interval}. # Only supported on numerical facets and returned if # {::Google::Cloud::Retail::V2::SearchRequest::FacetSpec::FacetKey#return_min_max SearchRequest.FacetSpec.FacetKey.return_min_max} # is true. class FacetValue include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#values ⇒ ::Array<::Google::Cloud::Retail::V2::SearchResponse::Facet::FacetValue>
Returns The facet values for this field.
922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 |
# File 'proto_docs/google/cloud/retail/v2/search_service.rb', line 922 class Facet include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A facet value which contains value names and their count. # @!attribute [rw] value # @return [::String] # Text value of a facet, such as "Black" for facet "colorFamilies". # @!attribute [rw] interval # @return [::Google::Cloud::Retail::V2::Interval] # Interval value for a facet, such as [10, 20) for facet "price". # @!attribute [rw] count # @return [::Integer] # Number of items that have this facet value. # @!attribute [rw] min_value # @return [::Float] # The minimum value in the # {::Google::Cloud::Retail::V2::SearchResponse::Facet::FacetValue#interval FacetValue.interval}. # Only supported on numerical facets and returned if # {::Google::Cloud::Retail::V2::SearchRequest::FacetSpec::FacetKey#return_min_max SearchRequest.FacetSpec.FacetKey.return_min_max} # is true. # @!attribute [rw] max_value # @return [::Float] # The maximum value in the # {::Google::Cloud::Retail::V2::SearchResponse::Facet::FacetValue#interval FacetValue.interval}. # Only supported on numerical facets and returned if # {::Google::Cloud::Retail::V2::SearchRequest::FacetSpec::FacetKey#return_min_max SearchRequest.FacetSpec.FacetKey.return_min_max} # is true. class FacetValue include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |