Reference documentation and code samples for the Discovery Engine V1BETA API class Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::FacetSpec::FacetKey.
Specifies how a facet is computed.
Inherits
- Object
Extended By
- Google::Protobuf::MessageExts::ClassMethods
Includes
- Google::Protobuf::MessageExts
Methods
#case_insensitive
def case_insensitive() -> ::Boolean
- (::Boolean) — True to make facet keys case insensitive when getting faceting values with prefixes or contains; false otherwise.
#case_insensitive=
def case_insensitive=(value) -> ::Boolean
- value (::Boolean) — True to make facet keys case insensitive when getting faceting values with prefixes or contains; false otherwise.
- (::Boolean) — True to make facet keys case insensitive when getting faceting values with prefixes or contains; false otherwise.
#contains
def contains() -> ::Array<::String>
- (::Array<::String>) — Only get facet values that contain the given strings. For example, suppose "category" has three values "Action > 2022", "Action > 2021" and "Sci-Fi > 2022". If set "contains" to "2022", the "category" facet only contains "Action > 2022" and "Sci-Fi > 2022". Only supported on textual fields. Maximum is 10.
#contains=
def contains=(value) -> ::Array<::String>
- value (::Array<::String>) — Only get facet values that contain the given strings. For example, suppose "category" has three values "Action > 2022", "Action > 2021" and "Sci-Fi > 2022". If set "contains" to "2022", the "category" facet only contains "Action > 2022" and "Sci-Fi > 2022". Only supported on textual fields. Maximum is 10.
- (::Array<::String>) — Only get facet values that contain the given strings. For example, suppose "category" has three values "Action > 2022", "Action > 2021" and "Sci-Fi > 2022". If set "contains" to "2022", the "category" facet only contains "Action > 2022" and "Sci-Fi > 2022". Only supported on textual fields. Maximum is 10.
#intervals
def intervals() -> ::Array<::Google::Cloud::DiscoveryEngine::V1beta::Interval>
- (::Array<::Google::Cloud::DiscoveryEngine::V1beta::Interval>) — Set only if values should be bucketed into intervals. Must be set for facets with numerical values. Must not be set for facet with text values. Maximum number of intervals is 30.
#intervals=
def intervals=(value) -> ::Array<::Google::Cloud::DiscoveryEngine::V1beta::Interval>
- value (::Array<::Google::Cloud::DiscoveryEngine::V1beta::Interval>) — Set only if values should be bucketed into intervals. Must be set for facets with numerical values. Must not be set for facet with text values. Maximum number of intervals is 30.
- (::Array<::Google::Cloud::DiscoveryEngine::V1beta::Interval>) — Set only if values should be bucketed into intervals. Must be set for facets with numerical values. Must not be set for facet with text values. Maximum number of intervals is 30.
#key
def key() -> ::String
- (::String) — Required. Supported textual and numerical facet keys in Document object, over which the facet values are computed. Facet key is case-sensitive.
#key=
def key=(value) -> ::String
- value (::String) — Required. Supported textual and numerical facet keys in Document object, over which the facet values are computed. Facet key is case-sensitive.
- (::String) — Required. Supported textual and numerical facet keys in Document object, over which the facet values are computed. Facet key is case-sensitive.
#order_by
def order_by() -> ::String
-
(::String) — The order in which documents are returned.
Allowed values are:
"count desc", which means order by SearchResponse.Facet.values.count descending.
"value desc", which means order by SearchResponse.Facet.values.value descending. Only applies to textual facets.
If not set, textual values are sorted in natural order; numerical intervals are sorted in the order given by FacetSpec.FacetKey.intervals.
#order_by=
def order_by=(value) -> ::String
-
value (::String) — The order in which documents are returned.
Allowed values are:
"count desc", which means order by SearchResponse.Facet.values.count descending.
"value desc", which means order by SearchResponse.Facet.values.value descending. Only applies to textual facets.
If not set, textual values are sorted in natural order; numerical intervals are sorted in the order given by FacetSpec.FacetKey.intervals.
-
(::String) — The order in which documents are returned.
Allowed values are:
"count desc", which means order by SearchResponse.Facet.values.count descending.
"value desc", which means order by SearchResponse.Facet.values.value descending. Only applies to textual facets.
If not set, textual values are sorted in natural order; numerical intervals are sorted in the order given by FacetSpec.FacetKey.intervals.
#prefixes
def prefixes() -> ::Array<::String>
- (::Array<::String>) — Only get facet values that start with the given string prefix. For example, suppose "category" has three values "Action > 2022", "Action > 2021" and "Sci-Fi > 2022". If set "prefixes" to "Action", the "category" facet only contains "Action > 2022" and "Action > 2021". Only supported on textual fields. Maximum is 10.
#prefixes=
def prefixes=(value) -> ::Array<::String>
- value (::Array<::String>) — Only get facet values that start with the given string prefix. For example, suppose "category" has three values "Action > 2022", "Action > 2021" and "Sci-Fi > 2022". If set "prefixes" to "Action", the "category" facet only contains "Action > 2022" and "Action > 2021". Only supported on textual fields. Maximum is 10.
- (::Array<::String>) — Only get facet values that start with the given string prefix. For example, suppose "category" has three values "Action > 2022", "Action > 2021" and "Sci-Fi > 2022". If set "prefixes" to "Action", the "category" facet only contains "Action > 2022" and "Action > 2021". Only supported on textual fields. Maximum is 10.
#restricted_values
def restricted_values() -> ::Array<::String>
- (::Array<::String>) — Only get facet for the given restricted values. Only supported on textual fields. For example, suppose "category" has three values "Action > 2022", "Action > 2021" and "Sci-Fi > 2022". If set "restricted_values" to "Action > 2022", the "category" facet only contains "Action > 2022". Only supported on textual fields. Maximum is 10.
#restricted_values=
def restricted_values=(value) -> ::Array<::String>
- value (::Array<::String>) — Only get facet for the given restricted values. Only supported on textual fields. For example, suppose "category" has three values "Action > 2022", "Action > 2021" and "Sci-Fi > 2022". If set "restricted_values" to "Action > 2022", the "category" facet only contains "Action > 2022". Only supported on textual fields. Maximum is 10.
- (::Array<::String>) — Only get facet for the given restricted values. Only supported on textual fields. For example, suppose "category" has three values "Action > 2022", "Action > 2021" and "Sci-Fi > 2022". If set "restricted_values" to "Action > 2022", the "category" facet only contains "Action > 2022". Only supported on textual fields. Maximum is 10.