Package com.google.cloud.retail.v2alpha
Class SearchRequest.FacetSpec.FacetKey
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey
- All Implemented Interfaces:
SearchRequest.FacetSpec.FacetKeyOrBuilder,com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Serializable
- Enclosing class:
- SearchRequest.FacetSpec
public static final class SearchRequest.FacetSpec.FacetKey
extends com.google.protobuf.GeneratedMessage
implements SearchRequest.FacetSpec.FacetKeyOrBuilder
Specifies how a facet is computed.Protobuf type
google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classSpecifies how a facet is computed.Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage
com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT, BuilderT>>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT extends com.google.protobuf.Message, T extends Object>, com.google.protobuf.GeneratedMessage.UnusedPrivateParameter Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessage
com.google.protobuf.AbstractMessage.BuilderParentNested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class com.google.protobuf.GeneratedMessage
alwaysUseFieldBuilders, loggedPre22TypeNames, unknownFieldsFields inherited from class com.google.protobuf.AbstractMessage
memoizedSizeFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanTrue to make facet keys case insensitive when getting faceting values with prefixes or contains; false otherwise.getContains(int index) Only get facet values that contains the given strings.com.google.protobuf.ByteStringgetContainsBytes(int index) Only get facet values that contains the given strings.intOnly get facet values that contains the given strings.com.google.protobuf.ProtocolStringListOnly get facet values that contains the given strings.static final com.google.protobuf.Descriptors.DescriptorgetIntervals(int index) Set only if values should be bucketized into intervals.intSet only if values should be bucketized into intervals.Set only if values should be bucketized into intervals.getIntervalsOrBuilder(int index) Set only if values should be bucketized into intervals.List<? extends IntervalOrBuilder>Set only if values should be bucketized into intervals.getKey()Required.com.google.protobuf.ByteStringRequired.The order in which [SearchResponse.Facet.values][google.cloud.retail.v2alpha.SearchResponse.Facet.values] are returned.com.google.protobuf.ByteStringThe order in which [SearchResponse.Facet.values][google.cloud.retail.v2alpha.SearchResponse.Facet.values] are returned.com.google.protobuf.Parser<SearchRequest.FacetSpec.FacetKey>getPrefixes(int index) Only get facet values that start with the given string prefix.com.google.protobuf.ByteStringgetPrefixesBytes(int index) Only get facet values that start with the given string prefix.intOnly get facet values that start with the given string prefix.com.google.protobuf.ProtocolStringListOnly get facet values that start with the given string prefix.getQuery()The query that is used to compute facet for the given facet key.com.google.protobuf.ByteStringThe query that is used to compute facet for the given facet key.getRestrictedValues(int index) Only get facet for the given restricted values.com.google.protobuf.ByteStringgetRestrictedValuesBytes(int index) Only get facet for the given restricted values.intOnly get facet for the given restricted values.com.google.protobuf.ProtocolStringListOnly get facet for the given restricted values.booleanReturns the min and max value for each numerical facet intervals.intinthashCode()protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleannewBuilder(SearchRequest.FacetSpec.FacetKey prototype) protected SearchRequest.FacetSpec.FacetKey.BuildernewBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) parseDelimitedFrom(InputStream input) parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) parseFrom(byte[] data) parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) parseFrom(com.google.protobuf.ByteString data) parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) parseFrom(com.google.protobuf.CodedInputStream input) parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) parseFrom(InputStream input) parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) parseFrom(ByteBuffer data) parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<SearchRequest.FacetSpec.FacetKey>parser()voidwriteTo(com.google.protobuf.CodedOutputStream output) Methods inherited from class com.google.protobuf.GeneratedMessage
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagMethods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashFields, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
KEY_FIELD_NUMBER
public static final int KEY_FIELD_NUMBER- See Also:
-
INTERVALS_FIELD_NUMBER
public static final int INTERVALS_FIELD_NUMBER- See Also:
-
RESTRICTED_VALUES_FIELD_NUMBER
public static final int RESTRICTED_VALUES_FIELD_NUMBER- See Also:
-
PREFIXES_FIELD_NUMBER
public static final int PREFIXES_FIELD_NUMBER- See Also:
-
CONTAINS_FIELD_NUMBER
public static final int CONTAINS_FIELD_NUMBER- See Also:
-
CASE_INSENSITIVE_FIELD_NUMBER
public static final int CASE_INSENSITIVE_FIELD_NUMBER- See Also:
-
ORDER_BY_FIELD_NUMBER
public static final int ORDER_BY_FIELD_NUMBER- See Also:
-
QUERY_FIELD_NUMBER
public static final int QUERY_FIELD_NUMBER- See Also:
-
RETURN_MIN_MAX_FIELD_NUMBER
public static final int RETURN_MIN_MAX_FIELD_NUMBER- See Also:
-
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage
-
getKey
Required. Supported textual and numerical facet keys in [Product][google.cloud.retail.v2alpha.Product] object, over which the facet values are computed. Facet key is case-sensitive. Allowed facet keys when [FacetKey.query][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.query] is not specified: * textual_field = * "brands" * "categories" * "genders" * "ageGroups" * "availability" * "colorFamilies" * "colors" * "sizes" * "materials" * "patterns" * "conditions" * "attributes.key" * "pickupInStore" * "shipToStore" * "sameDayDelivery" * "nextDayDelivery" * "customFulfillment1" * "customFulfillment2" * "customFulfillment3" * "customFulfillment4" * "customFulfillment5" * "inventory(place_id,attributes.key)" * numerical_field = * "price" * "discount" * "rating" * "ratingCount" * "attributes.key" * "inventory(place_id,price)" * "inventory(place_id,original_price)" * "inventory(place_id,attributes.key)"
string key = 1 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getKeyin interfaceSearchRequest.FacetSpec.FacetKeyOrBuilder- Returns:
- The key.
-
getKeyBytes
public com.google.protobuf.ByteString getKeyBytes()Required. Supported textual and numerical facet keys in [Product][google.cloud.retail.v2alpha.Product] object, over which the facet values are computed. Facet key is case-sensitive. Allowed facet keys when [FacetKey.query][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.query] is not specified: * textual_field = * "brands" * "categories" * "genders" * "ageGroups" * "availability" * "colorFamilies" * "colors" * "sizes" * "materials" * "patterns" * "conditions" * "attributes.key" * "pickupInStore" * "shipToStore" * "sameDayDelivery" * "nextDayDelivery" * "customFulfillment1" * "customFulfillment2" * "customFulfillment3" * "customFulfillment4" * "customFulfillment5" * "inventory(place_id,attributes.key)" * numerical_field = * "price" * "discount" * "rating" * "ratingCount" * "attributes.key" * "inventory(place_id,price)" * "inventory(place_id,original_price)" * "inventory(place_id,attributes.key)"
string key = 1 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getKeyBytesin interfaceSearchRequest.FacetSpec.FacetKeyOrBuilder- Returns:
- The bytes for key.
-
getIntervalsList
Set only if values should be bucketized into intervals. Must be set for facets with numerical values. Must not be set for facet with text values. Maximum number of intervals is 40. For all numerical facet keys that appear in the list of products from the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are computed from their distribution weekly. If the model assigns a high score to a numerical facet key and its intervals are not specified in the search request, these percentiles become the bounds for its intervals and are returned in the response. If the facet key intervals are specified in the request, then the specified intervals are returned instead.
repeated .google.cloud.retail.v2alpha.Interval intervals = 2;- Specified by:
getIntervalsListin interfaceSearchRequest.FacetSpec.FacetKeyOrBuilder
-
getIntervalsOrBuilderList
Set only if values should be bucketized into intervals. Must be set for facets with numerical values. Must not be set for facet with text values. Maximum number of intervals is 40. For all numerical facet keys that appear in the list of products from the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are computed from their distribution weekly. If the model assigns a high score to a numerical facet key and its intervals are not specified in the search request, these percentiles become the bounds for its intervals and are returned in the response. If the facet key intervals are specified in the request, then the specified intervals are returned instead.
repeated .google.cloud.retail.v2alpha.Interval intervals = 2;- Specified by:
getIntervalsOrBuilderListin interfaceSearchRequest.FacetSpec.FacetKeyOrBuilder
-
getIntervalsCount
public int getIntervalsCount()Set only if values should be bucketized into intervals. Must be set for facets with numerical values. Must not be set for facet with text values. Maximum number of intervals is 40. For all numerical facet keys that appear in the list of products from the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are computed from their distribution weekly. If the model assigns a high score to a numerical facet key and its intervals are not specified in the search request, these percentiles become the bounds for its intervals and are returned in the response. If the facet key intervals are specified in the request, then the specified intervals are returned instead.
repeated .google.cloud.retail.v2alpha.Interval intervals = 2;- Specified by:
getIntervalsCountin interfaceSearchRequest.FacetSpec.FacetKeyOrBuilder
-
getIntervals
Set only if values should be bucketized into intervals. Must be set for facets with numerical values. Must not be set for facet with text values. Maximum number of intervals is 40. For all numerical facet keys that appear in the list of products from the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are computed from their distribution weekly. If the model assigns a high score to a numerical facet key and its intervals are not specified in the search request, these percentiles become the bounds for its intervals and are returned in the response. If the facet key intervals are specified in the request, then the specified intervals are returned instead.
repeated .google.cloud.retail.v2alpha.Interval intervals = 2;- Specified by:
getIntervalsin interfaceSearchRequest.FacetSpec.FacetKeyOrBuilder
-
getIntervalsOrBuilder
Set only if values should be bucketized into intervals. Must be set for facets with numerical values. Must not be set for facet with text values. Maximum number of intervals is 40. For all numerical facet keys that appear in the list of products from the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are computed from their distribution weekly. If the model assigns a high score to a numerical facet key and its intervals are not specified in the search request, these percentiles become the bounds for its intervals and are returned in the response. If the facet key intervals are specified in the request, then the specified intervals are returned instead.
repeated .google.cloud.retail.v2alpha.Interval intervals = 2;- Specified by:
getIntervalsOrBuilderin interfaceSearchRequest.FacetSpec.FacetKeyOrBuilder
-
getRestrictedValuesList
public com.google.protobuf.ProtocolStringList getRestrictedValuesList()Only get facet for the given restricted values. For example, when using "pickupInStore" as key and set restricted values to ["store123", "store456"], only facets for "store123" and "store456" are returned. Only supported on predefined textual fields, custom textual attributes and fulfillments. Maximum is 20. Must be set for the fulfillment facet keys: * pickupInStore * shipToStore * sameDayDelivery * nextDayDelivery * customFulfillment1 * customFulfillment2 * customFulfillment3 * customFulfillment4 * customFulfillment5
repeated string restricted_values = 3;- Specified by:
getRestrictedValuesListin interfaceSearchRequest.FacetSpec.FacetKeyOrBuilder- Returns:
- A list containing the restrictedValues.
-
getRestrictedValuesCount
public int getRestrictedValuesCount()Only get facet for the given restricted values. For example, when using "pickupInStore" as key and set restricted values to ["store123", "store456"], only facets for "store123" and "store456" are returned. Only supported on predefined textual fields, custom textual attributes and fulfillments. Maximum is 20. Must be set for the fulfillment facet keys: * pickupInStore * shipToStore * sameDayDelivery * nextDayDelivery * customFulfillment1 * customFulfillment2 * customFulfillment3 * customFulfillment4 * customFulfillment5
repeated string restricted_values = 3;- Specified by:
getRestrictedValuesCountin interfaceSearchRequest.FacetSpec.FacetKeyOrBuilder- Returns:
- The count of restrictedValues.
-
getRestrictedValues
Only get facet for the given restricted values. For example, when using "pickupInStore" as key and set restricted values to ["store123", "store456"], only facets for "store123" and "store456" are returned. Only supported on predefined textual fields, custom textual attributes and fulfillments. Maximum is 20. Must be set for the fulfillment facet keys: * pickupInStore * shipToStore * sameDayDelivery * nextDayDelivery * customFulfillment1 * customFulfillment2 * customFulfillment3 * customFulfillment4 * customFulfillment5
repeated string restricted_values = 3;- Specified by:
getRestrictedValuesin interfaceSearchRequest.FacetSpec.FacetKeyOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The restrictedValues at the given index.
-
getRestrictedValuesBytes
public com.google.protobuf.ByteString getRestrictedValuesBytes(int index) Only get facet for the given restricted values. For example, when using "pickupInStore" as key and set restricted values to ["store123", "store456"], only facets for "store123" and "store456" are returned. Only supported on predefined textual fields, custom textual attributes and fulfillments. Maximum is 20. Must be set for the fulfillment facet keys: * pickupInStore * shipToStore * sameDayDelivery * nextDayDelivery * customFulfillment1 * customFulfillment2 * customFulfillment3 * customFulfillment4 * customFulfillment5
repeated string restricted_values = 3;- Specified by:
getRestrictedValuesBytesin interfaceSearchRequest.FacetSpec.FacetKeyOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the restrictedValues at the given index.
-
getPrefixesList
public com.google.protobuf.ProtocolStringList getPrefixesList()Only get facet values that start with the given string prefix. For example, suppose "categories" has three values "Women > Shoe", "Women > Dress" and "Men > Shoe". If set "prefixes" to "Women", the "categories" facet gives only "Women > Shoe" and "Women > Dress". Only supported on textual fields. Maximum is 10.
repeated string prefixes = 8;- Specified by:
getPrefixesListin interfaceSearchRequest.FacetSpec.FacetKeyOrBuilder- Returns:
- A list containing the prefixes.
-
getPrefixesCount
public int getPrefixesCount()Only get facet values that start with the given string prefix. For example, suppose "categories" has three values "Women > Shoe", "Women > Dress" and "Men > Shoe". If set "prefixes" to "Women", the "categories" facet gives only "Women > Shoe" and "Women > Dress". Only supported on textual fields. Maximum is 10.
repeated string prefixes = 8;- Specified by:
getPrefixesCountin interfaceSearchRequest.FacetSpec.FacetKeyOrBuilder- Returns:
- The count of prefixes.
-
getPrefixes
Only get facet values that start with the given string prefix. For example, suppose "categories" has three values "Women > Shoe", "Women > Dress" and "Men > Shoe". If set "prefixes" to "Women", the "categories" facet gives only "Women > Shoe" and "Women > Dress". Only supported on textual fields. Maximum is 10.
repeated string prefixes = 8;- Specified by:
getPrefixesin interfaceSearchRequest.FacetSpec.FacetKeyOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The prefixes at the given index.
-
getPrefixesBytes
public com.google.protobuf.ByteString getPrefixesBytes(int index) Only get facet values that start with the given string prefix. For example, suppose "categories" has three values "Women > Shoe", "Women > Dress" and "Men > Shoe". If set "prefixes" to "Women", the "categories" facet gives only "Women > Shoe" and "Women > Dress". Only supported on textual fields. Maximum is 10.
repeated string prefixes = 8;- Specified by:
getPrefixesBytesin interfaceSearchRequest.FacetSpec.FacetKeyOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the prefixes at the given index.
-
getContainsList
public com.google.protobuf.ProtocolStringList getContainsList()Only get facet values that contains the given strings. For example, suppose "categories" has three values "Women > Shoe", "Women > Dress" and "Men > Shoe". If set "contains" to "Shoe", the "categories" facet gives only "Women > Shoe" and "Men > Shoe". Only supported on textual fields. Maximum is 10.
repeated string contains = 9;- Specified by:
getContainsListin interfaceSearchRequest.FacetSpec.FacetKeyOrBuilder- Returns:
- A list containing the contains.
-
getContainsCount
public int getContainsCount()Only get facet values that contains the given strings. For example, suppose "categories" has three values "Women > Shoe", "Women > Dress" and "Men > Shoe". If set "contains" to "Shoe", the "categories" facet gives only "Women > Shoe" and "Men > Shoe". Only supported on textual fields. Maximum is 10.
repeated string contains = 9;- Specified by:
getContainsCountin interfaceSearchRequest.FacetSpec.FacetKeyOrBuilder- Returns:
- The count of contains.
-
getContains
Only get facet values that contains the given strings. For example, suppose "categories" has three values "Women > Shoe", "Women > Dress" and "Men > Shoe". If set "contains" to "Shoe", the "categories" facet gives only "Women > Shoe" and "Men > Shoe". Only supported on textual fields. Maximum is 10.
repeated string contains = 9;- Specified by:
getContainsin interfaceSearchRequest.FacetSpec.FacetKeyOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The contains at the given index.
-
getContainsBytes
public com.google.protobuf.ByteString getContainsBytes(int index) Only get facet values that contains the given strings. For example, suppose "categories" has three values "Women > Shoe", "Women > Dress" and "Men > Shoe". If set "contains" to "Shoe", the "categories" facet gives only "Women > Shoe" and "Men > Shoe". Only supported on textual fields. Maximum is 10.
repeated string contains = 9;- Specified by:
getContainsBytesin interfaceSearchRequest.FacetSpec.FacetKeyOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the contains at the given index.
-
getCaseInsensitive
public boolean getCaseInsensitive()True to make facet keys case insensitive when getting faceting values with prefixes or contains; false otherwise.
bool case_insensitive = 10;- Specified by:
getCaseInsensitivein interfaceSearchRequest.FacetSpec.FacetKeyOrBuilder- Returns:
- The caseInsensitive.
-
getOrderBy
The order in which [SearchResponse.Facet.values][google.cloud.retail.v2alpha.SearchResponse.Facet.values] are returned. Allowed values are: * "count desc", which means order by [SearchResponse.Facet.values.count][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.count] descending. * "value desc", which means order by [SearchResponse.Facet.values.value][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.value] descending. Only applies to textual facets. If not set, textual values are sorted in [natural order](https://en.wikipedia.org/wiki/Natural_sort_order); numerical intervals are sorted in the order given by [FacetSpec.FacetKey.intervals][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.intervals]; [FulfillmentInfo.place_ids][google.cloud.retail.v2alpha.FulfillmentInfo.place_ids] are sorted in the order given by [FacetSpec.FacetKey.restricted_values][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.restricted_values].
string order_by = 4;- Specified by:
getOrderByin interfaceSearchRequest.FacetSpec.FacetKeyOrBuilder- Returns:
- The orderBy.
-
getOrderByBytes
public com.google.protobuf.ByteString getOrderByBytes()The order in which [SearchResponse.Facet.values][google.cloud.retail.v2alpha.SearchResponse.Facet.values] are returned. Allowed values are: * "count desc", which means order by [SearchResponse.Facet.values.count][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.count] descending. * "value desc", which means order by [SearchResponse.Facet.values.value][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.value] descending. Only applies to textual facets. If not set, textual values are sorted in [natural order](https://en.wikipedia.org/wiki/Natural_sort_order); numerical intervals are sorted in the order given by [FacetSpec.FacetKey.intervals][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.intervals]; [FulfillmentInfo.place_ids][google.cloud.retail.v2alpha.FulfillmentInfo.place_ids] are sorted in the order given by [FacetSpec.FacetKey.restricted_values][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.restricted_values].
string order_by = 4;- Specified by:
getOrderByBytesin interfaceSearchRequest.FacetSpec.FacetKeyOrBuilder- Returns:
- The bytes for orderBy.
-
getQuery
The query that is used to compute facet for the given facet key. When provided, it overrides the default behavior of facet computation. The query syntax is the same as a filter expression. See [SearchRequest.filter][google.cloud.retail.v2alpha.SearchRequest.filter] for detail syntax and limitations. Notice that there is no limitation on [FacetKey.key][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.key] when query is specified. In the response, [SearchResponse.Facet.values.value][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.value] is always "1" and [SearchResponse.Facet.values.count][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.count] is the number of results that match the query. For example, you can set a customized facet for "shipToStore", where [FacetKey.key][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.key] is "customizedShipToStore", and [FacetKey.query][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.query] is "availability: ANY(\"IN_STOCK\") AND shipToStore: ANY(\"123\")". Then the facet counts the products that are both in stock and ship to store "123".
string query = 5;- Specified by:
getQueryin interfaceSearchRequest.FacetSpec.FacetKeyOrBuilder- Returns:
- The query.
-
getQueryBytes
public com.google.protobuf.ByteString getQueryBytes()The query that is used to compute facet for the given facet key. When provided, it overrides the default behavior of facet computation. The query syntax is the same as a filter expression. See [SearchRequest.filter][google.cloud.retail.v2alpha.SearchRequest.filter] for detail syntax and limitations. Notice that there is no limitation on [FacetKey.key][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.key] when query is specified. In the response, [SearchResponse.Facet.values.value][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.value] is always "1" and [SearchResponse.Facet.values.count][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.count] is the number of results that match the query. For example, you can set a customized facet for "shipToStore", where [FacetKey.key][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.key] is "customizedShipToStore", and [FacetKey.query][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.query] is "availability: ANY(\"IN_STOCK\") AND shipToStore: ANY(\"123\")". Then the facet counts the products that are both in stock and ship to store "123".
string query = 5;- Specified by:
getQueryBytesin interfaceSearchRequest.FacetSpec.FacetKeyOrBuilder- Returns:
- The bytes for query.
-
getReturnMinMax
public boolean getReturnMinMax()Returns the min and max value for each numerical facet intervals. Ignored for textual facets.
bool return_min_max = 11;- Specified by:
getReturnMinMaxin interfaceSearchRequest.FacetSpec.FacetKeyOrBuilder- Returns:
- The returnMinMax.
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage
-
writeTo
- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessage- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessage
-
equals
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static SearchRequest.FacetSpec.FacetKey parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static SearchRequest.FacetSpec.FacetKey parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static SearchRequest.FacetSpec.FacetKey parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static SearchRequest.FacetSpec.FacetKey parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static SearchRequest.FacetSpec.FacetKey parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static SearchRequest.FacetSpec.FacetKey parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static SearchRequest.FacetSpec.FacetKey parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
public static SearchRequest.FacetSpec.FacetKey parseDelimitedFrom(InputStream input) throws IOException - Throws:
IOException
-
parseDelimitedFrom
public static SearchRequest.FacetSpec.FacetKey parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
public static SearchRequest.FacetSpec.FacetKey parseFrom(com.google.protobuf.CodedInputStream input) throws IOException - Throws:
IOException
-
parseFrom
public static SearchRequest.FacetSpec.FacetKey parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilderForType
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
public static SearchRequest.FacetSpec.FacetKey.Builder newBuilder(SearchRequest.FacetSpec.FacetKey prototype) -
toBuilder
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected SearchRequest.FacetSpec.FacetKey.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) - Overrides:
newBuilderForTypein classcom.google.protobuf.AbstractMessage
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessage
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-