Class: Google::Cloud::Retail::V2::SearchResponse
- Inherits:
-
Object
- Object
- Google::Cloud::Retail::V2::SearchResponse
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/cloud/retail/v2/search_service.rb
Overview
Response message for SearchService.Search method.
Defined Under Namespace
Classes: Facet, QueryExpansionInfo, SearchResult
Instance Attribute Summary collapse
-
#applied_controls ⇒ ::Array<::String>
The fully qualified resource name of applied controls.
-
#attribution_token ⇒ ::String
A unique search token.
-
#corrected_query ⇒ ::String
Contains the spell corrected query, if found.
-
#experiment_info ⇒ ::Array<::Google::Cloud::Retail::V2::ExperimentInfo>
Metadata related to A/B testing [Experiment][] associated with this response.
-
#facets ⇒ ::Array<::Google::Cloud::Retail::V2::SearchResponse::Facet>
Results of facets requested by user.
-
#invalid_condition_boost_specs ⇒ ::Array<::Google::Cloud::Retail::V2::SearchRequest::BoostSpec::ConditionBoostSpec>
The invalid SearchRequest.BoostSpec.condition_boost_specs that are not applied during serving.
-
#next_page_token ⇒ ::String
A token that can be sent as SearchRequest.page_token to retrieve the next page.
-
#query_expansion_info ⇒ ::Google::Cloud::Retail::V2::SearchResponse::QueryExpansionInfo
Query expansion information for the returned results.
-
#redirect_uri ⇒ ::String
The URI of a customer-defined redirect page.
-
#results ⇒ ::Array<::Google::Cloud::Retail::V2::SearchResponse::SearchResult>
A list of matched items.
-
#total_size ⇒ ::Integer
The estimated total count of matched items irrespective of pagination.
Instance Attribute Details
#applied_controls ⇒ ::Array<::String>
Returns The fully qualified resource name of applied controls.
797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 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 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 |
# File 'proto_docs/google/cloud/retail/v2/search_service.rb', line 797 class SearchResponse include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents the search results. # @!attribute [rw] id # @return [::String] # {::Google::Cloud::Retail::V2::Product#id Product.id} of the searched # {::Google::Cloud::Retail::V2::Product Product}. # @!attribute [rw] product # @return [::Google::Cloud::Retail::V2::Product] # The product data snippet in the search response. Only # {::Google::Cloud::Retail::V2::Product#name Product.name} is guaranteed to be # populated. # # {::Google::Cloud::Retail::V2::Product#variants Product.variants} contains the # product variants that match the search query. If there are multiple # product variants matching the query, top 5 most relevant product variants # are returned and ordered by relevancy. # # If relevancy can be deternmined, use # {::Google::Cloud::Retail::V2::SearchResponse::SearchResult#matching_variant_fields matching_variant_fields} # to look up matched product variants fields. If relevancy cannot be # determined, e.g. when searching "shoe" all products in a shoe product can # be a match, 5 product variants are returned but order is meaningless. # @!attribute [rw] matching_variant_count # @return [::Integer] # The count of matched # {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant} # {::Google::Cloud::Retail::V2::Product Product}s. # @!attribute [rw] matching_variant_fields # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::FieldMask}] # If a {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant} # {::Google::Cloud::Retail::V2::Product Product} matches the search query, this # map indicates which {::Google::Cloud::Retail::V2::Product Product} fields are # matched. The key is the # {::Google::Cloud::Retail::V2::Product#name Product.name}, the value is a field # mask of the matched {::Google::Cloud::Retail::V2::Product Product} fields. If # matched attributes cannot be determined, this map will be empty. # # For example, a key "sku1" with field mask # "products.color_info" indicates there is a match between # "sku1" {::Google::Cloud::Retail::V2::ColorInfo ColorInfo} and the query. # @!attribute [rw] variant_rollup_values # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] # The rollup matching # {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant} # {::Google::Cloud::Retail::V2::Product Product} attributes. The key is one of # the # {::Google::Cloud::Retail::V2::SearchRequest#variant_rollup_keys SearchRequest.variant_rollup_keys}. # The values are the merged and de-duplicated # {::Google::Cloud::Retail::V2::Product Product} attributes. Notice that the # rollup values are respect filter. For example, when filtering by # "colorFamilies:ANY(\"red\")" and rollup "colorFamilies", only "red" is # returned. # # For textual and numerical attributes, the rollup values is a list of # string or double values with type # {::Google::Protobuf::ListValue google.protobuf.ListValue}. For example, if # there are two variants with colors "red" and "blue", the rollup values # are # # { key: "colorFamilies" # value { # list_value { # values { string_value: "red" } # values { string_value: "blue" } # } # } # } # # For {::Google::Cloud::Retail::V2::FulfillmentInfo FulfillmentInfo}, the rollup # values is a double value with type # {::Google::Protobuf::Value google.protobuf.Value}. For example, # `{key: "pickupInStore.store1" value { number_value: 10 }}` means a there # are 10 variants in this product are available in the store "store1". # @!attribute [rw] personal_labels # @return [::Array<::String>] # Specifies previous events related to this product for this user based on # {::Google::Cloud::Retail::V2::UserEvent UserEvent} with same # {::Google::Cloud::Retail::V2::SearchRequest#visitor_id SearchRequest.visitor_id} # or {::Google::Cloud::Retail::V2::UserInfo#user_id UserInfo.user_id}. # # This is set only when # {::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec#mode SearchRequest.PersonalizationSpec.mode} # is # {::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec::Mode::AUTO SearchRequest.PersonalizationSpec.Mode.AUTO}. # # Possible values: # # * `purchased`: Indicates that this product has been purchased before. class SearchResult include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Protobuf::FieldMask] class MatchingVariantFieldsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Protobuf::Value] class VariantRollupValuesEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A facet result. # @!attribute [rw] key # @return [::String] # The key for this facet. E.g., "colorFamilies" or "price" or # "attributes.attr1". # @!attribute [rw] values # @return [::Array<::Google::Cloud::Retail::V2::SearchResponse::Facet::FacetValue>] # The facet values for this field. # @!attribute [rw] dynamic_facet # @return [::Boolean] # Whether the facet is dynamically generated. 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 # Information describing query expansion including whether expansion has # occurred. # @!attribute [rw] expanded_query # @return [::Boolean] # Bool describing whether query expansion has occurred. # @!attribute [rw] pinned_result_count # @return [::Integer] # Number of pinned results. This field will only be set when expansion # happens and # {::Google::Cloud::Retail::V2::SearchRequest::QueryExpansionSpec#pin_unexpanded_results SearchRequest.QueryExpansionSpec.pin_unexpanded_results} # is set to true. class QueryExpansionInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#attribution_token ⇒ ::String
Returns A unique search token. This should be included in the UserEvent logs resulting from this search, which enables accurate attribution of search model performance.
797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 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 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 |
# File 'proto_docs/google/cloud/retail/v2/search_service.rb', line 797 class SearchResponse include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents the search results. # @!attribute [rw] id # @return [::String] # {::Google::Cloud::Retail::V2::Product#id Product.id} of the searched # {::Google::Cloud::Retail::V2::Product Product}. # @!attribute [rw] product # @return [::Google::Cloud::Retail::V2::Product] # The product data snippet in the search response. Only # {::Google::Cloud::Retail::V2::Product#name Product.name} is guaranteed to be # populated. # # {::Google::Cloud::Retail::V2::Product#variants Product.variants} contains the # product variants that match the search query. If there are multiple # product variants matching the query, top 5 most relevant product variants # are returned and ordered by relevancy. # # If relevancy can be deternmined, use # {::Google::Cloud::Retail::V2::SearchResponse::SearchResult#matching_variant_fields matching_variant_fields} # to look up matched product variants fields. If relevancy cannot be # determined, e.g. when searching "shoe" all products in a shoe product can # be a match, 5 product variants are returned but order is meaningless. # @!attribute [rw] matching_variant_count # @return [::Integer] # The count of matched # {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant} # {::Google::Cloud::Retail::V2::Product Product}s. # @!attribute [rw] matching_variant_fields # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::FieldMask}] # If a {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant} # {::Google::Cloud::Retail::V2::Product Product} matches the search query, this # map indicates which {::Google::Cloud::Retail::V2::Product Product} fields are # matched. The key is the # {::Google::Cloud::Retail::V2::Product#name Product.name}, the value is a field # mask of the matched {::Google::Cloud::Retail::V2::Product Product} fields. If # matched attributes cannot be determined, this map will be empty. # # For example, a key "sku1" with field mask # "products.color_info" indicates there is a match between # "sku1" {::Google::Cloud::Retail::V2::ColorInfo ColorInfo} and the query. # @!attribute [rw] variant_rollup_values # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] # The rollup matching # {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant} # {::Google::Cloud::Retail::V2::Product Product} attributes. The key is one of # the # {::Google::Cloud::Retail::V2::SearchRequest#variant_rollup_keys SearchRequest.variant_rollup_keys}. # The values are the merged and de-duplicated # {::Google::Cloud::Retail::V2::Product Product} attributes. Notice that the # rollup values are respect filter. For example, when filtering by # "colorFamilies:ANY(\"red\")" and rollup "colorFamilies", only "red" is # returned. # # For textual and numerical attributes, the rollup values is a list of # string or double values with type # {::Google::Protobuf::ListValue google.protobuf.ListValue}. For example, if # there are two variants with colors "red" and "blue", the rollup values # are # # { key: "colorFamilies" # value { # list_value { # values { string_value: "red" } # values { string_value: "blue" } # } # } # } # # For {::Google::Cloud::Retail::V2::FulfillmentInfo FulfillmentInfo}, the rollup # values is a double value with type # {::Google::Protobuf::Value google.protobuf.Value}. For example, # `{key: "pickupInStore.store1" value { number_value: 10 }}` means a there # are 10 variants in this product are available in the store "store1". # @!attribute [rw] personal_labels # @return [::Array<::String>] # Specifies previous events related to this product for this user based on # {::Google::Cloud::Retail::V2::UserEvent UserEvent} with same # {::Google::Cloud::Retail::V2::SearchRequest#visitor_id SearchRequest.visitor_id} # or {::Google::Cloud::Retail::V2::UserInfo#user_id UserInfo.user_id}. # # This is set only when # {::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec#mode SearchRequest.PersonalizationSpec.mode} # is # {::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec::Mode::AUTO SearchRequest.PersonalizationSpec.Mode.AUTO}. # # Possible values: # # * `purchased`: Indicates that this product has been purchased before. class SearchResult include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Protobuf::FieldMask] class MatchingVariantFieldsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Protobuf::Value] class VariantRollupValuesEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A facet result. # @!attribute [rw] key # @return [::String] # The key for this facet. E.g., "colorFamilies" or "price" or # "attributes.attr1". # @!attribute [rw] values # @return [::Array<::Google::Cloud::Retail::V2::SearchResponse::Facet::FacetValue>] # The facet values for this field. # @!attribute [rw] dynamic_facet # @return [::Boolean] # Whether the facet is dynamically generated. 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 # Information describing query expansion including whether expansion has # occurred. # @!attribute [rw] expanded_query # @return [::Boolean] # Bool describing whether query expansion has occurred. # @!attribute [rw] pinned_result_count # @return [::Integer] # Number of pinned results. This field will only be set when expansion # happens and # {::Google::Cloud::Retail::V2::SearchRequest::QueryExpansionSpec#pin_unexpanded_results SearchRequest.QueryExpansionSpec.pin_unexpanded_results} # is set to true. class QueryExpansionInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#corrected_query ⇒ ::String
Returns Contains the spell corrected query, if found. If the spell correction type is AUTOMATIC, then the search results are based on corrected_query. Otherwise the original query is used for search.
797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 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 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 |
# File 'proto_docs/google/cloud/retail/v2/search_service.rb', line 797 class SearchResponse include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents the search results. # @!attribute [rw] id # @return [::String] # {::Google::Cloud::Retail::V2::Product#id Product.id} of the searched # {::Google::Cloud::Retail::V2::Product Product}. # @!attribute [rw] product # @return [::Google::Cloud::Retail::V2::Product] # The product data snippet in the search response. Only # {::Google::Cloud::Retail::V2::Product#name Product.name} is guaranteed to be # populated. # # {::Google::Cloud::Retail::V2::Product#variants Product.variants} contains the # product variants that match the search query. If there are multiple # product variants matching the query, top 5 most relevant product variants # are returned and ordered by relevancy. # # If relevancy can be deternmined, use # {::Google::Cloud::Retail::V2::SearchResponse::SearchResult#matching_variant_fields matching_variant_fields} # to look up matched product variants fields. If relevancy cannot be # determined, e.g. when searching "shoe" all products in a shoe product can # be a match, 5 product variants are returned but order is meaningless. # @!attribute [rw] matching_variant_count # @return [::Integer] # The count of matched # {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant} # {::Google::Cloud::Retail::V2::Product Product}s. # @!attribute [rw] matching_variant_fields # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::FieldMask}] # If a {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant} # {::Google::Cloud::Retail::V2::Product Product} matches the search query, this # map indicates which {::Google::Cloud::Retail::V2::Product Product} fields are # matched. The key is the # {::Google::Cloud::Retail::V2::Product#name Product.name}, the value is a field # mask of the matched {::Google::Cloud::Retail::V2::Product Product} fields. If # matched attributes cannot be determined, this map will be empty. # # For example, a key "sku1" with field mask # "products.color_info" indicates there is a match between # "sku1" {::Google::Cloud::Retail::V2::ColorInfo ColorInfo} and the query. # @!attribute [rw] variant_rollup_values # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] # The rollup matching # {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant} # {::Google::Cloud::Retail::V2::Product Product} attributes. The key is one of # the # {::Google::Cloud::Retail::V2::SearchRequest#variant_rollup_keys SearchRequest.variant_rollup_keys}. # The values are the merged and de-duplicated # {::Google::Cloud::Retail::V2::Product Product} attributes. Notice that the # rollup values are respect filter. For example, when filtering by # "colorFamilies:ANY(\"red\")" and rollup "colorFamilies", only "red" is # returned. # # For textual and numerical attributes, the rollup values is a list of # string or double values with type # {::Google::Protobuf::ListValue google.protobuf.ListValue}. For example, if # there are two variants with colors "red" and "blue", the rollup values # are # # { key: "colorFamilies" # value { # list_value { # values { string_value: "red" } # values { string_value: "blue" } # } # } # } # # For {::Google::Cloud::Retail::V2::FulfillmentInfo FulfillmentInfo}, the rollup # values is a double value with type # {::Google::Protobuf::Value google.protobuf.Value}. For example, # `{key: "pickupInStore.store1" value { number_value: 10 }}` means a there # are 10 variants in this product are available in the store "store1". # @!attribute [rw] personal_labels # @return [::Array<::String>] # Specifies previous events related to this product for this user based on # {::Google::Cloud::Retail::V2::UserEvent UserEvent} with same # {::Google::Cloud::Retail::V2::SearchRequest#visitor_id SearchRequest.visitor_id} # or {::Google::Cloud::Retail::V2::UserInfo#user_id UserInfo.user_id}. # # This is set only when # {::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec#mode SearchRequest.PersonalizationSpec.mode} # is # {::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec::Mode::AUTO SearchRequest.PersonalizationSpec.Mode.AUTO}. # # Possible values: # # * `purchased`: Indicates that this product has been purchased before. class SearchResult include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Protobuf::FieldMask] class MatchingVariantFieldsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Protobuf::Value] class VariantRollupValuesEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A facet result. # @!attribute [rw] key # @return [::String] # The key for this facet. E.g., "colorFamilies" or "price" or # "attributes.attr1". # @!attribute [rw] values # @return [::Array<::Google::Cloud::Retail::V2::SearchResponse::Facet::FacetValue>] # The facet values for this field. # @!attribute [rw] dynamic_facet # @return [::Boolean] # Whether the facet is dynamically generated. 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 # Information describing query expansion including whether expansion has # occurred. # @!attribute [rw] expanded_query # @return [::Boolean] # Bool describing whether query expansion has occurred. # @!attribute [rw] pinned_result_count # @return [::Integer] # Number of pinned results. This field will only be set when expansion # happens and # {::Google::Cloud::Retail::V2::SearchRequest::QueryExpansionSpec#pin_unexpanded_results SearchRequest.QueryExpansionSpec.pin_unexpanded_results} # is set to true. class QueryExpansionInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#experiment_info ⇒ ::Array<::Google::Cloud::Retail::V2::ExperimentInfo>
Returns Metadata related to A/B testing [Experiment][] associated with this response. Only exists when an experiment is triggered.
797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 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 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 |
# File 'proto_docs/google/cloud/retail/v2/search_service.rb', line 797 class SearchResponse include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents the search results. # @!attribute [rw] id # @return [::String] # {::Google::Cloud::Retail::V2::Product#id Product.id} of the searched # {::Google::Cloud::Retail::V2::Product Product}. # @!attribute [rw] product # @return [::Google::Cloud::Retail::V2::Product] # The product data snippet in the search response. Only # {::Google::Cloud::Retail::V2::Product#name Product.name} is guaranteed to be # populated. # # {::Google::Cloud::Retail::V2::Product#variants Product.variants} contains the # product variants that match the search query. If there are multiple # product variants matching the query, top 5 most relevant product variants # are returned and ordered by relevancy. # # If relevancy can be deternmined, use # {::Google::Cloud::Retail::V2::SearchResponse::SearchResult#matching_variant_fields matching_variant_fields} # to look up matched product variants fields. If relevancy cannot be # determined, e.g. when searching "shoe" all products in a shoe product can # be a match, 5 product variants are returned but order is meaningless. # @!attribute [rw] matching_variant_count # @return [::Integer] # The count of matched # {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant} # {::Google::Cloud::Retail::V2::Product Product}s. # @!attribute [rw] matching_variant_fields # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::FieldMask}] # If a {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant} # {::Google::Cloud::Retail::V2::Product Product} matches the search query, this # map indicates which {::Google::Cloud::Retail::V2::Product Product} fields are # matched. The key is the # {::Google::Cloud::Retail::V2::Product#name Product.name}, the value is a field # mask of the matched {::Google::Cloud::Retail::V2::Product Product} fields. If # matched attributes cannot be determined, this map will be empty. # # For example, a key "sku1" with field mask # "products.color_info" indicates there is a match between # "sku1" {::Google::Cloud::Retail::V2::ColorInfo ColorInfo} and the query. # @!attribute [rw] variant_rollup_values # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] # The rollup matching # {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant} # {::Google::Cloud::Retail::V2::Product Product} attributes. The key is one of # the # {::Google::Cloud::Retail::V2::SearchRequest#variant_rollup_keys SearchRequest.variant_rollup_keys}. # The values are the merged and de-duplicated # {::Google::Cloud::Retail::V2::Product Product} attributes. Notice that the # rollup values are respect filter. For example, when filtering by # "colorFamilies:ANY(\"red\")" and rollup "colorFamilies", only "red" is # returned. # # For textual and numerical attributes, the rollup values is a list of # string or double values with type # {::Google::Protobuf::ListValue google.protobuf.ListValue}. For example, if # there are two variants with colors "red" and "blue", the rollup values # are # # { key: "colorFamilies" # value { # list_value { # values { string_value: "red" } # values { string_value: "blue" } # } # } # } # # For {::Google::Cloud::Retail::V2::FulfillmentInfo FulfillmentInfo}, the rollup # values is a double value with type # {::Google::Protobuf::Value google.protobuf.Value}. For example, # `{key: "pickupInStore.store1" value { number_value: 10 }}` means a there # are 10 variants in this product are available in the store "store1". # @!attribute [rw] personal_labels # @return [::Array<::String>] # Specifies previous events related to this product for this user based on # {::Google::Cloud::Retail::V2::UserEvent UserEvent} with same # {::Google::Cloud::Retail::V2::SearchRequest#visitor_id SearchRequest.visitor_id} # or {::Google::Cloud::Retail::V2::UserInfo#user_id UserInfo.user_id}. # # This is set only when # {::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec#mode SearchRequest.PersonalizationSpec.mode} # is # {::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec::Mode::AUTO SearchRequest.PersonalizationSpec.Mode.AUTO}. # # Possible values: # # * `purchased`: Indicates that this product has been purchased before. class SearchResult include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Protobuf::FieldMask] class MatchingVariantFieldsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Protobuf::Value] class VariantRollupValuesEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A facet result. # @!attribute [rw] key # @return [::String] # The key for this facet. E.g., "colorFamilies" or "price" or # "attributes.attr1". # @!attribute [rw] values # @return [::Array<::Google::Cloud::Retail::V2::SearchResponse::Facet::FacetValue>] # The facet values for this field. # @!attribute [rw] dynamic_facet # @return [::Boolean] # Whether the facet is dynamically generated. 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 # Information describing query expansion including whether expansion has # occurred. # @!attribute [rw] expanded_query # @return [::Boolean] # Bool describing whether query expansion has occurred. # @!attribute [rw] pinned_result_count # @return [::Integer] # Number of pinned results. This field will only be set when expansion # happens and # {::Google::Cloud::Retail::V2::SearchRequest::QueryExpansionSpec#pin_unexpanded_results SearchRequest.QueryExpansionSpec.pin_unexpanded_results} # is set to true. class QueryExpansionInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#facets ⇒ ::Array<::Google::Cloud::Retail::V2::SearchResponse::Facet>
Returns Results of facets requested by user.
797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 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 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 |
# File 'proto_docs/google/cloud/retail/v2/search_service.rb', line 797 class SearchResponse include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents the search results. # @!attribute [rw] id # @return [::String] # {::Google::Cloud::Retail::V2::Product#id Product.id} of the searched # {::Google::Cloud::Retail::V2::Product Product}. # @!attribute [rw] product # @return [::Google::Cloud::Retail::V2::Product] # The product data snippet in the search response. Only # {::Google::Cloud::Retail::V2::Product#name Product.name} is guaranteed to be # populated. # # {::Google::Cloud::Retail::V2::Product#variants Product.variants} contains the # product variants that match the search query. If there are multiple # product variants matching the query, top 5 most relevant product variants # are returned and ordered by relevancy. # # If relevancy can be deternmined, use # {::Google::Cloud::Retail::V2::SearchResponse::SearchResult#matching_variant_fields matching_variant_fields} # to look up matched product variants fields. If relevancy cannot be # determined, e.g. when searching "shoe" all products in a shoe product can # be a match, 5 product variants are returned but order is meaningless. # @!attribute [rw] matching_variant_count # @return [::Integer] # The count of matched # {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant} # {::Google::Cloud::Retail::V2::Product Product}s. # @!attribute [rw] matching_variant_fields # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::FieldMask}] # If a {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant} # {::Google::Cloud::Retail::V2::Product Product} matches the search query, this # map indicates which {::Google::Cloud::Retail::V2::Product Product} fields are # matched. The key is the # {::Google::Cloud::Retail::V2::Product#name Product.name}, the value is a field # mask of the matched {::Google::Cloud::Retail::V2::Product Product} fields. If # matched attributes cannot be determined, this map will be empty. # # For example, a key "sku1" with field mask # "products.color_info" indicates there is a match between # "sku1" {::Google::Cloud::Retail::V2::ColorInfo ColorInfo} and the query. # @!attribute [rw] variant_rollup_values # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] # The rollup matching # {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant} # {::Google::Cloud::Retail::V2::Product Product} attributes. The key is one of # the # {::Google::Cloud::Retail::V2::SearchRequest#variant_rollup_keys SearchRequest.variant_rollup_keys}. # The values are the merged and de-duplicated # {::Google::Cloud::Retail::V2::Product Product} attributes. Notice that the # rollup values are respect filter. For example, when filtering by # "colorFamilies:ANY(\"red\")" and rollup "colorFamilies", only "red" is # returned. # # For textual and numerical attributes, the rollup values is a list of # string or double values with type # {::Google::Protobuf::ListValue google.protobuf.ListValue}. For example, if # there are two variants with colors "red" and "blue", the rollup values # are # # { key: "colorFamilies" # value { # list_value { # values { string_value: "red" } # values { string_value: "blue" } # } # } # } # # For {::Google::Cloud::Retail::V2::FulfillmentInfo FulfillmentInfo}, the rollup # values is a double value with type # {::Google::Protobuf::Value google.protobuf.Value}. For example, # `{key: "pickupInStore.store1" value { number_value: 10 }}` means a there # are 10 variants in this product are available in the store "store1". # @!attribute [rw] personal_labels # @return [::Array<::String>] # Specifies previous events related to this product for this user based on # {::Google::Cloud::Retail::V2::UserEvent UserEvent} with same # {::Google::Cloud::Retail::V2::SearchRequest#visitor_id SearchRequest.visitor_id} # or {::Google::Cloud::Retail::V2::UserInfo#user_id UserInfo.user_id}. # # This is set only when # {::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec#mode SearchRequest.PersonalizationSpec.mode} # is # {::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec::Mode::AUTO SearchRequest.PersonalizationSpec.Mode.AUTO}. # # Possible values: # # * `purchased`: Indicates that this product has been purchased before. class SearchResult include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Protobuf::FieldMask] class MatchingVariantFieldsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Protobuf::Value] class VariantRollupValuesEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A facet result. # @!attribute [rw] key # @return [::String] # The key for this facet. E.g., "colorFamilies" or "price" or # "attributes.attr1". # @!attribute [rw] values # @return [::Array<::Google::Cloud::Retail::V2::SearchResponse::Facet::FacetValue>] # The facet values for this field. # @!attribute [rw] dynamic_facet # @return [::Boolean] # Whether the facet is dynamically generated. 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 # Information describing query expansion including whether expansion has # occurred. # @!attribute [rw] expanded_query # @return [::Boolean] # Bool describing whether query expansion has occurred. # @!attribute [rw] pinned_result_count # @return [::Integer] # Number of pinned results. This field will only be set when expansion # happens and # {::Google::Cloud::Retail::V2::SearchRequest::QueryExpansionSpec#pin_unexpanded_results SearchRequest.QueryExpansionSpec.pin_unexpanded_results} # is set to true. class QueryExpansionInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#invalid_condition_boost_specs ⇒ ::Array<::Google::Cloud::Retail::V2::SearchRequest::BoostSpec::ConditionBoostSpec>
Returns The invalid SearchRequest.BoostSpec.condition_boost_specs that are not applied during serving.
797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 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 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 |
# File 'proto_docs/google/cloud/retail/v2/search_service.rb', line 797 class SearchResponse include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents the search results. # @!attribute [rw] id # @return [::String] # {::Google::Cloud::Retail::V2::Product#id Product.id} of the searched # {::Google::Cloud::Retail::V2::Product Product}. # @!attribute [rw] product # @return [::Google::Cloud::Retail::V2::Product] # The product data snippet in the search response. Only # {::Google::Cloud::Retail::V2::Product#name Product.name} is guaranteed to be # populated. # # {::Google::Cloud::Retail::V2::Product#variants Product.variants} contains the # product variants that match the search query. If there are multiple # product variants matching the query, top 5 most relevant product variants # are returned and ordered by relevancy. # # If relevancy can be deternmined, use # {::Google::Cloud::Retail::V2::SearchResponse::SearchResult#matching_variant_fields matching_variant_fields} # to look up matched product variants fields. If relevancy cannot be # determined, e.g. when searching "shoe" all products in a shoe product can # be a match, 5 product variants are returned but order is meaningless. # @!attribute [rw] matching_variant_count # @return [::Integer] # The count of matched # {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant} # {::Google::Cloud::Retail::V2::Product Product}s. # @!attribute [rw] matching_variant_fields # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::FieldMask}] # If a {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant} # {::Google::Cloud::Retail::V2::Product Product} matches the search query, this # map indicates which {::Google::Cloud::Retail::V2::Product Product} fields are # matched. The key is the # {::Google::Cloud::Retail::V2::Product#name Product.name}, the value is a field # mask of the matched {::Google::Cloud::Retail::V2::Product Product} fields. If # matched attributes cannot be determined, this map will be empty. # # For example, a key "sku1" with field mask # "products.color_info" indicates there is a match between # "sku1" {::Google::Cloud::Retail::V2::ColorInfo ColorInfo} and the query. # @!attribute [rw] variant_rollup_values # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] # The rollup matching # {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant} # {::Google::Cloud::Retail::V2::Product Product} attributes. The key is one of # the # {::Google::Cloud::Retail::V2::SearchRequest#variant_rollup_keys SearchRequest.variant_rollup_keys}. # The values are the merged and de-duplicated # {::Google::Cloud::Retail::V2::Product Product} attributes. Notice that the # rollup values are respect filter. For example, when filtering by # "colorFamilies:ANY(\"red\")" and rollup "colorFamilies", only "red" is # returned. # # For textual and numerical attributes, the rollup values is a list of # string or double values with type # {::Google::Protobuf::ListValue google.protobuf.ListValue}. For example, if # there are two variants with colors "red" and "blue", the rollup values # are # # { key: "colorFamilies" # value { # list_value { # values { string_value: "red" } # values { string_value: "blue" } # } # } # } # # For {::Google::Cloud::Retail::V2::FulfillmentInfo FulfillmentInfo}, the rollup # values is a double value with type # {::Google::Protobuf::Value google.protobuf.Value}. For example, # `{key: "pickupInStore.store1" value { number_value: 10 }}` means a there # are 10 variants in this product are available in the store "store1". # @!attribute [rw] personal_labels # @return [::Array<::String>] # Specifies previous events related to this product for this user based on # {::Google::Cloud::Retail::V2::UserEvent UserEvent} with same # {::Google::Cloud::Retail::V2::SearchRequest#visitor_id SearchRequest.visitor_id} # or {::Google::Cloud::Retail::V2::UserInfo#user_id UserInfo.user_id}. # # This is set only when # {::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec#mode SearchRequest.PersonalizationSpec.mode} # is # {::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec::Mode::AUTO SearchRequest.PersonalizationSpec.Mode.AUTO}. # # Possible values: # # * `purchased`: Indicates that this product has been purchased before. class SearchResult include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Protobuf::FieldMask] class MatchingVariantFieldsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Protobuf::Value] class VariantRollupValuesEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A facet result. # @!attribute [rw] key # @return [::String] # The key for this facet. E.g., "colorFamilies" or "price" or # "attributes.attr1". # @!attribute [rw] values # @return [::Array<::Google::Cloud::Retail::V2::SearchResponse::Facet::FacetValue>] # The facet values for this field. # @!attribute [rw] dynamic_facet # @return [::Boolean] # Whether the facet is dynamically generated. 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 # Information describing query expansion including whether expansion has # occurred. # @!attribute [rw] expanded_query # @return [::Boolean] # Bool describing whether query expansion has occurred. # @!attribute [rw] pinned_result_count # @return [::Integer] # Number of pinned results. This field will only be set when expansion # happens and # {::Google::Cloud::Retail::V2::SearchRequest::QueryExpansionSpec#pin_unexpanded_results SearchRequest.QueryExpansionSpec.pin_unexpanded_results} # is set to true. class QueryExpansionInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#next_page_token ⇒ ::String
Returns A token that can be sent as SearchRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.
797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 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 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 |
# File 'proto_docs/google/cloud/retail/v2/search_service.rb', line 797 class SearchResponse include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents the search results. # @!attribute [rw] id # @return [::String] # {::Google::Cloud::Retail::V2::Product#id Product.id} of the searched # {::Google::Cloud::Retail::V2::Product Product}. # @!attribute [rw] product # @return [::Google::Cloud::Retail::V2::Product] # The product data snippet in the search response. Only # {::Google::Cloud::Retail::V2::Product#name Product.name} is guaranteed to be # populated. # # {::Google::Cloud::Retail::V2::Product#variants Product.variants} contains the # product variants that match the search query. If there are multiple # product variants matching the query, top 5 most relevant product variants # are returned and ordered by relevancy. # # If relevancy can be deternmined, use # {::Google::Cloud::Retail::V2::SearchResponse::SearchResult#matching_variant_fields matching_variant_fields} # to look up matched product variants fields. If relevancy cannot be # determined, e.g. when searching "shoe" all products in a shoe product can # be a match, 5 product variants are returned but order is meaningless. # @!attribute [rw] matching_variant_count # @return [::Integer] # The count of matched # {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant} # {::Google::Cloud::Retail::V2::Product Product}s. # @!attribute [rw] matching_variant_fields # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::FieldMask}] # If a {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant} # {::Google::Cloud::Retail::V2::Product Product} matches the search query, this # map indicates which {::Google::Cloud::Retail::V2::Product Product} fields are # matched. The key is the # {::Google::Cloud::Retail::V2::Product#name Product.name}, the value is a field # mask of the matched {::Google::Cloud::Retail::V2::Product Product} fields. If # matched attributes cannot be determined, this map will be empty. # # For example, a key "sku1" with field mask # "products.color_info" indicates there is a match between # "sku1" {::Google::Cloud::Retail::V2::ColorInfo ColorInfo} and the query. # @!attribute [rw] variant_rollup_values # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] # The rollup matching # {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant} # {::Google::Cloud::Retail::V2::Product Product} attributes. The key is one of # the # {::Google::Cloud::Retail::V2::SearchRequest#variant_rollup_keys SearchRequest.variant_rollup_keys}. # The values are the merged and de-duplicated # {::Google::Cloud::Retail::V2::Product Product} attributes. Notice that the # rollup values are respect filter. For example, when filtering by # "colorFamilies:ANY(\"red\")" and rollup "colorFamilies", only "red" is # returned. # # For textual and numerical attributes, the rollup values is a list of # string or double values with type # {::Google::Protobuf::ListValue google.protobuf.ListValue}. For example, if # there are two variants with colors "red" and "blue", the rollup values # are # # { key: "colorFamilies" # value { # list_value { # values { string_value: "red" } # values { string_value: "blue" } # } # } # } # # For {::Google::Cloud::Retail::V2::FulfillmentInfo FulfillmentInfo}, the rollup # values is a double value with type # {::Google::Protobuf::Value google.protobuf.Value}. For example, # `{key: "pickupInStore.store1" value { number_value: 10 }}` means a there # are 10 variants in this product are available in the store "store1". # @!attribute [rw] personal_labels # @return [::Array<::String>] # Specifies previous events related to this product for this user based on # {::Google::Cloud::Retail::V2::UserEvent UserEvent} with same # {::Google::Cloud::Retail::V2::SearchRequest#visitor_id SearchRequest.visitor_id} # or {::Google::Cloud::Retail::V2::UserInfo#user_id UserInfo.user_id}. # # This is set only when # {::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec#mode SearchRequest.PersonalizationSpec.mode} # is # {::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec::Mode::AUTO SearchRequest.PersonalizationSpec.Mode.AUTO}. # # Possible values: # # * `purchased`: Indicates that this product has been purchased before. class SearchResult include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Protobuf::FieldMask] class MatchingVariantFieldsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Protobuf::Value] class VariantRollupValuesEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A facet result. # @!attribute [rw] key # @return [::String] # The key for this facet. E.g., "colorFamilies" or "price" or # "attributes.attr1". # @!attribute [rw] values # @return [::Array<::Google::Cloud::Retail::V2::SearchResponse::Facet::FacetValue>] # The facet values for this field. # @!attribute [rw] dynamic_facet # @return [::Boolean] # Whether the facet is dynamically generated. 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 # Information describing query expansion including whether expansion has # occurred. # @!attribute [rw] expanded_query # @return [::Boolean] # Bool describing whether query expansion has occurred. # @!attribute [rw] pinned_result_count # @return [::Integer] # Number of pinned results. This field will only be set when expansion # happens and # {::Google::Cloud::Retail::V2::SearchRequest::QueryExpansionSpec#pin_unexpanded_results SearchRequest.QueryExpansionSpec.pin_unexpanded_results} # is set to true. class QueryExpansionInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#query_expansion_info ⇒ ::Google::Cloud::Retail::V2::SearchResponse::QueryExpansionInfo
Returns Query expansion information for the returned results.
797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 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 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 |
# File 'proto_docs/google/cloud/retail/v2/search_service.rb', line 797 class SearchResponse include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents the search results. # @!attribute [rw] id # @return [::String] # {::Google::Cloud::Retail::V2::Product#id Product.id} of the searched # {::Google::Cloud::Retail::V2::Product Product}. # @!attribute [rw] product # @return [::Google::Cloud::Retail::V2::Product] # The product data snippet in the search response. Only # {::Google::Cloud::Retail::V2::Product#name Product.name} is guaranteed to be # populated. # # {::Google::Cloud::Retail::V2::Product#variants Product.variants} contains the # product variants that match the search query. If there are multiple # product variants matching the query, top 5 most relevant product variants # are returned and ordered by relevancy. # # If relevancy can be deternmined, use # {::Google::Cloud::Retail::V2::SearchResponse::SearchResult#matching_variant_fields matching_variant_fields} # to look up matched product variants fields. If relevancy cannot be # determined, e.g. when searching "shoe" all products in a shoe product can # be a match, 5 product variants are returned but order is meaningless. # @!attribute [rw] matching_variant_count # @return [::Integer] # The count of matched # {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant} # {::Google::Cloud::Retail::V2::Product Product}s. # @!attribute [rw] matching_variant_fields # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::FieldMask}] # If a {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant} # {::Google::Cloud::Retail::V2::Product Product} matches the search query, this # map indicates which {::Google::Cloud::Retail::V2::Product Product} fields are # matched. The key is the # {::Google::Cloud::Retail::V2::Product#name Product.name}, the value is a field # mask of the matched {::Google::Cloud::Retail::V2::Product Product} fields. If # matched attributes cannot be determined, this map will be empty. # # For example, a key "sku1" with field mask # "products.color_info" indicates there is a match between # "sku1" {::Google::Cloud::Retail::V2::ColorInfo ColorInfo} and the query. # @!attribute [rw] variant_rollup_values # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] # The rollup matching # {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant} # {::Google::Cloud::Retail::V2::Product Product} attributes. The key is one of # the # {::Google::Cloud::Retail::V2::SearchRequest#variant_rollup_keys SearchRequest.variant_rollup_keys}. # The values are the merged and de-duplicated # {::Google::Cloud::Retail::V2::Product Product} attributes. Notice that the # rollup values are respect filter. For example, when filtering by # "colorFamilies:ANY(\"red\")" and rollup "colorFamilies", only "red" is # returned. # # For textual and numerical attributes, the rollup values is a list of # string or double values with type # {::Google::Protobuf::ListValue google.protobuf.ListValue}. For example, if # there are two variants with colors "red" and "blue", the rollup values # are # # { key: "colorFamilies" # value { # list_value { # values { string_value: "red" } # values { string_value: "blue" } # } # } # } # # For {::Google::Cloud::Retail::V2::FulfillmentInfo FulfillmentInfo}, the rollup # values is a double value with type # {::Google::Protobuf::Value google.protobuf.Value}. For example, # `{key: "pickupInStore.store1" value { number_value: 10 }}` means a there # are 10 variants in this product are available in the store "store1". # @!attribute [rw] personal_labels # @return [::Array<::String>] # Specifies previous events related to this product for this user based on # {::Google::Cloud::Retail::V2::UserEvent UserEvent} with same # {::Google::Cloud::Retail::V2::SearchRequest#visitor_id SearchRequest.visitor_id} # or {::Google::Cloud::Retail::V2::UserInfo#user_id UserInfo.user_id}. # # This is set only when # {::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec#mode SearchRequest.PersonalizationSpec.mode} # is # {::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec::Mode::AUTO SearchRequest.PersonalizationSpec.Mode.AUTO}. # # Possible values: # # * `purchased`: Indicates that this product has been purchased before. class SearchResult include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Protobuf::FieldMask] class MatchingVariantFieldsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Protobuf::Value] class VariantRollupValuesEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A facet result. # @!attribute [rw] key # @return [::String] # The key for this facet. E.g., "colorFamilies" or "price" or # "attributes.attr1". # @!attribute [rw] values # @return [::Array<::Google::Cloud::Retail::V2::SearchResponse::Facet::FacetValue>] # The facet values for this field. # @!attribute [rw] dynamic_facet # @return [::Boolean] # Whether the facet is dynamically generated. 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 # Information describing query expansion including whether expansion has # occurred. # @!attribute [rw] expanded_query # @return [::Boolean] # Bool describing whether query expansion has occurred. # @!attribute [rw] pinned_result_count # @return [::Integer] # Number of pinned results. This field will only be set when expansion # happens and # {::Google::Cloud::Retail::V2::SearchRequest::QueryExpansionSpec#pin_unexpanded_results SearchRequest.QueryExpansionSpec.pin_unexpanded_results} # is set to true. class QueryExpansionInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#redirect_uri ⇒ ::String
Returns The URI of a customer-defined redirect page. If redirect action is triggered, no search is performed, and only redirect_uri and attribution_token are set in the response.
797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 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 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 |
# File 'proto_docs/google/cloud/retail/v2/search_service.rb', line 797 class SearchResponse include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents the search results. # @!attribute [rw] id # @return [::String] # {::Google::Cloud::Retail::V2::Product#id Product.id} of the searched # {::Google::Cloud::Retail::V2::Product Product}. # @!attribute [rw] product # @return [::Google::Cloud::Retail::V2::Product] # The product data snippet in the search response. Only # {::Google::Cloud::Retail::V2::Product#name Product.name} is guaranteed to be # populated. # # {::Google::Cloud::Retail::V2::Product#variants Product.variants} contains the # product variants that match the search query. If there are multiple # product variants matching the query, top 5 most relevant product variants # are returned and ordered by relevancy. # # If relevancy can be deternmined, use # {::Google::Cloud::Retail::V2::SearchResponse::SearchResult#matching_variant_fields matching_variant_fields} # to look up matched product variants fields. If relevancy cannot be # determined, e.g. when searching "shoe" all products in a shoe product can # be a match, 5 product variants are returned but order is meaningless. # @!attribute [rw] matching_variant_count # @return [::Integer] # The count of matched # {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant} # {::Google::Cloud::Retail::V2::Product Product}s. # @!attribute [rw] matching_variant_fields # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::FieldMask}] # If a {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant} # {::Google::Cloud::Retail::V2::Product Product} matches the search query, this # map indicates which {::Google::Cloud::Retail::V2::Product Product} fields are # matched. The key is the # {::Google::Cloud::Retail::V2::Product#name Product.name}, the value is a field # mask of the matched {::Google::Cloud::Retail::V2::Product Product} fields. If # matched attributes cannot be determined, this map will be empty. # # For example, a key "sku1" with field mask # "products.color_info" indicates there is a match between # "sku1" {::Google::Cloud::Retail::V2::ColorInfo ColorInfo} and the query. # @!attribute [rw] variant_rollup_values # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] # The rollup matching # {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant} # {::Google::Cloud::Retail::V2::Product Product} attributes. The key is one of # the # {::Google::Cloud::Retail::V2::SearchRequest#variant_rollup_keys SearchRequest.variant_rollup_keys}. # The values are the merged and de-duplicated # {::Google::Cloud::Retail::V2::Product Product} attributes. Notice that the # rollup values are respect filter. For example, when filtering by # "colorFamilies:ANY(\"red\")" and rollup "colorFamilies", only "red" is # returned. # # For textual and numerical attributes, the rollup values is a list of # string or double values with type # {::Google::Protobuf::ListValue google.protobuf.ListValue}. For example, if # there are two variants with colors "red" and "blue", the rollup values # are # # { key: "colorFamilies" # value { # list_value { # values { string_value: "red" } # values { string_value: "blue" } # } # } # } # # For {::Google::Cloud::Retail::V2::FulfillmentInfo FulfillmentInfo}, the rollup # values is a double value with type # {::Google::Protobuf::Value google.protobuf.Value}. For example, # `{key: "pickupInStore.store1" value { number_value: 10 }}` means a there # are 10 variants in this product are available in the store "store1". # @!attribute [rw] personal_labels # @return [::Array<::String>] # Specifies previous events related to this product for this user based on # {::Google::Cloud::Retail::V2::UserEvent UserEvent} with same # {::Google::Cloud::Retail::V2::SearchRequest#visitor_id SearchRequest.visitor_id} # or {::Google::Cloud::Retail::V2::UserInfo#user_id UserInfo.user_id}. # # This is set only when # {::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec#mode SearchRequest.PersonalizationSpec.mode} # is # {::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec::Mode::AUTO SearchRequest.PersonalizationSpec.Mode.AUTO}. # # Possible values: # # * `purchased`: Indicates that this product has been purchased before. class SearchResult include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Protobuf::FieldMask] class MatchingVariantFieldsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Protobuf::Value] class VariantRollupValuesEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A facet result. # @!attribute [rw] key # @return [::String] # The key for this facet. E.g., "colorFamilies" or "price" or # "attributes.attr1". # @!attribute [rw] values # @return [::Array<::Google::Cloud::Retail::V2::SearchResponse::Facet::FacetValue>] # The facet values for this field. # @!attribute [rw] dynamic_facet # @return [::Boolean] # Whether the facet is dynamically generated. 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 # Information describing query expansion including whether expansion has # occurred. # @!attribute [rw] expanded_query # @return [::Boolean] # Bool describing whether query expansion has occurred. # @!attribute [rw] pinned_result_count # @return [::Integer] # Number of pinned results. This field will only be set when expansion # happens and # {::Google::Cloud::Retail::V2::SearchRequest::QueryExpansionSpec#pin_unexpanded_results SearchRequest.QueryExpansionSpec.pin_unexpanded_results} # is set to true. class QueryExpansionInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#results ⇒ ::Array<::Google::Cloud::Retail::V2::SearchResponse::SearchResult>
Returns A list of matched items. The order represents the ranking.
797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 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 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 |
# File 'proto_docs/google/cloud/retail/v2/search_service.rb', line 797 class SearchResponse include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents the search results. # @!attribute [rw] id # @return [::String] # {::Google::Cloud::Retail::V2::Product#id Product.id} of the searched # {::Google::Cloud::Retail::V2::Product Product}. # @!attribute [rw] product # @return [::Google::Cloud::Retail::V2::Product] # The product data snippet in the search response. Only # {::Google::Cloud::Retail::V2::Product#name Product.name} is guaranteed to be # populated. # # {::Google::Cloud::Retail::V2::Product#variants Product.variants} contains the # product variants that match the search query. If there are multiple # product variants matching the query, top 5 most relevant product variants # are returned and ordered by relevancy. # # If relevancy can be deternmined, use # {::Google::Cloud::Retail::V2::SearchResponse::SearchResult#matching_variant_fields matching_variant_fields} # to look up matched product variants fields. If relevancy cannot be # determined, e.g. when searching "shoe" all products in a shoe product can # be a match, 5 product variants are returned but order is meaningless. # @!attribute [rw] matching_variant_count # @return [::Integer] # The count of matched # {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant} # {::Google::Cloud::Retail::V2::Product Product}s. # @!attribute [rw] matching_variant_fields # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::FieldMask}] # If a {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant} # {::Google::Cloud::Retail::V2::Product Product} matches the search query, this # map indicates which {::Google::Cloud::Retail::V2::Product Product} fields are # matched. The key is the # {::Google::Cloud::Retail::V2::Product#name Product.name}, the value is a field # mask of the matched {::Google::Cloud::Retail::V2::Product Product} fields. If # matched attributes cannot be determined, this map will be empty. # # For example, a key "sku1" with field mask # "products.color_info" indicates there is a match between # "sku1" {::Google::Cloud::Retail::V2::ColorInfo ColorInfo} and the query. # @!attribute [rw] variant_rollup_values # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] # The rollup matching # {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant} # {::Google::Cloud::Retail::V2::Product Product} attributes. The key is one of # the # {::Google::Cloud::Retail::V2::SearchRequest#variant_rollup_keys SearchRequest.variant_rollup_keys}. # The values are the merged and de-duplicated # {::Google::Cloud::Retail::V2::Product Product} attributes. Notice that the # rollup values are respect filter. For example, when filtering by # "colorFamilies:ANY(\"red\")" and rollup "colorFamilies", only "red" is # returned. # # For textual and numerical attributes, the rollup values is a list of # string or double values with type # {::Google::Protobuf::ListValue google.protobuf.ListValue}. For example, if # there are two variants with colors "red" and "blue", the rollup values # are # # { key: "colorFamilies" # value { # list_value { # values { string_value: "red" } # values { string_value: "blue" } # } # } # } # # For {::Google::Cloud::Retail::V2::FulfillmentInfo FulfillmentInfo}, the rollup # values is a double value with type # {::Google::Protobuf::Value google.protobuf.Value}. For example, # `{key: "pickupInStore.store1" value { number_value: 10 }}` means a there # are 10 variants in this product are available in the store "store1". # @!attribute [rw] personal_labels # @return [::Array<::String>] # Specifies previous events related to this product for this user based on # {::Google::Cloud::Retail::V2::UserEvent UserEvent} with same # {::Google::Cloud::Retail::V2::SearchRequest#visitor_id SearchRequest.visitor_id} # or {::Google::Cloud::Retail::V2::UserInfo#user_id UserInfo.user_id}. # # This is set only when # {::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec#mode SearchRequest.PersonalizationSpec.mode} # is # {::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec::Mode::AUTO SearchRequest.PersonalizationSpec.Mode.AUTO}. # # Possible values: # # * `purchased`: Indicates that this product has been purchased before. class SearchResult include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Protobuf::FieldMask] class MatchingVariantFieldsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Protobuf::Value] class VariantRollupValuesEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A facet result. # @!attribute [rw] key # @return [::String] # The key for this facet. E.g., "colorFamilies" or "price" or # "attributes.attr1". # @!attribute [rw] values # @return [::Array<::Google::Cloud::Retail::V2::SearchResponse::Facet::FacetValue>] # The facet values for this field. # @!attribute [rw] dynamic_facet # @return [::Boolean] # Whether the facet is dynamically generated. 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 # Information describing query expansion including whether expansion has # occurred. # @!attribute [rw] expanded_query # @return [::Boolean] # Bool describing whether query expansion has occurred. # @!attribute [rw] pinned_result_count # @return [::Integer] # Number of pinned results. This field will only be set when expansion # happens and # {::Google::Cloud::Retail::V2::SearchRequest::QueryExpansionSpec#pin_unexpanded_results SearchRequest.QueryExpansionSpec.pin_unexpanded_results} # is set to true. class QueryExpansionInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#total_size ⇒ ::Integer
Returns The estimated total count of matched items irrespective of pagination. The count of results returned by pagination may be less than the total_size that matches.
797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 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 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 |
# File 'proto_docs/google/cloud/retail/v2/search_service.rb', line 797 class SearchResponse include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents the search results. # @!attribute [rw] id # @return [::String] # {::Google::Cloud::Retail::V2::Product#id Product.id} of the searched # {::Google::Cloud::Retail::V2::Product Product}. # @!attribute [rw] product # @return [::Google::Cloud::Retail::V2::Product] # The product data snippet in the search response. Only # {::Google::Cloud::Retail::V2::Product#name Product.name} is guaranteed to be # populated. # # {::Google::Cloud::Retail::V2::Product#variants Product.variants} contains the # product variants that match the search query. If there are multiple # product variants matching the query, top 5 most relevant product variants # are returned and ordered by relevancy. # # If relevancy can be deternmined, use # {::Google::Cloud::Retail::V2::SearchResponse::SearchResult#matching_variant_fields matching_variant_fields} # to look up matched product variants fields. If relevancy cannot be # determined, e.g. when searching "shoe" all products in a shoe product can # be a match, 5 product variants are returned but order is meaningless. # @!attribute [rw] matching_variant_count # @return [::Integer] # The count of matched # {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant} # {::Google::Cloud::Retail::V2::Product Product}s. # @!attribute [rw] matching_variant_fields # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::FieldMask}] # If a {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant} # {::Google::Cloud::Retail::V2::Product Product} matches the search query, this # map indicates which {::Google::Cloud::Retail::V2::Product Product} fields are # matched. The key is the # {::Google::Cloud::Retail::V2::Product#name Product.name}, the value is a field # mask of the matched {::Google::Cloud::Retail::V2::Product Product} fields. If # matched attributes cannot be determined, this map will be empty. # # For example, a key "sku1" with field mask # "products.color_info" indicates there is a match between # "sku1" {::Google::Cloud::Retail::V2::ColorInfo ColorInfo} and the query. # @!attribute [rw] variant_rollup_values # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] # The rollup matching # {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant} # {::Google::Cloud::Retail::V2::Product Product} attributes. The key is one of # the # {::Google::Cloud::Retail::V2::SearchRequest#variant_rollup_keys SearchRequest.variant_rollup_keys}. # The values are the merged and de-duplicated # {::Google::Cloud::Retail::V2::Product Product} attributes. Notice that the # rollup values are respect filter. For example, when filtering by # "colorFamilies:ANY(\"red\")" and rollup "colorFamilies", only "red" is # returned. # # For textual and numerical attributes, the rollup values is a list of # string or double values with type # {::Google::Protobuf::ListValue google.protobuf.ListValue}. For example, if # there are two variants with colors "red" and "blue", the rollup values # are # # { key: "colorFamilies" # value { # list_value { # values { string_value: "red" } # values { string_value: "blue" } # } # } # } # # For {::Google::Cloud::Retail::V2::FulfillmentInfo FulfillmentInfo}, the rollup # values is a double value with type # {::Google::Protobuf::Value google.protobuf.Value}. For example, # `{key: "pickupInStore.store1" value { number_value: 10 }}` means a there # are 10 variants in this product are available in the store "store1". # @!attribute [rw] personal_labels # @return [::Array<::String>] # Specifies previous events related to this product for this user based on # {::Google::Cloud::Retail::V2::UserEvent UserEvent} with same # {::Google::Cloud::Retail::V2::SearchRequest#visitor_id SearchRequest.visitor_id} # or {::Google::Cloud::Retail::V2::UserInfo#user_id UserInfo.user_id}. # # This is set only when # {::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec#mode SearchRequest.PersonalizationSpec.mode} # is # {::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec::Mode::AUTO SearchRequest.PersonalizationSpec.Mode.AUTO}. # # Possible values: # # * `purchased`: Indicates that this product has been purchased before. class SearchResult include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Protobuf::FieldMask] class MatchingVariantFieldsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Protobuf::Value] class VariantRollupValuesEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A facet result. # @!attribute [rw] key # @return [::String] # The key for this facet. E.g., "colorFamilies" or "price" or # "attributes.attr1". # @!attribute [rw] values # @return [::Array<::Google::Cloud::Retail::V2::SearchResponse::Facet::FacetValue>] # The facet values for this field. # @!attribute [rw] dynamic_facet # @return [::Boolean] # Whether the facet is dynamically generated. 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 # Information describing query expansion including whether expansion has # occurred. # @!attribute [rw] expanded_query # @return [::Boolean] # Bool describing whether query expansion has occurred. # @!attribute [rw] pinned_result_count # @return [::Integer] # Number of pinned results. This field will only be set when expansion # happens and # {::Google::Cloud::Retail::V2::SearchRequest::QueryExpansionSpec#pin_unexpanded_results SearchRequest.QueryExpansionSpec.pin_unexpanded_results} # is set to true. class QueryExpansionInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |