Class: Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpecFacetKey
- Inherits:
-
Object
- Object
- Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpecFacetKey
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/discoveryengine_v1/classes.rb,
lib/google/apis/discoveryengine_v1/representations.rb,
lib/google/apis/discoveryengine_v1/representations.rb
Overview
Specifies how a facet is computed.
Instance Attribute Summary collapse
-
#case_insensitive ⇒ Boolean
(also: #case_insensitive?)
True to make facet keys case insensitive when getting faceting values with prefixes or contains; false otherwise.
-
#contains ⇒ Array<String>
Only get facet values that contain the given strings.
-
#intervals ⇒ Array<Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1betaInterval>
Set only if values should be bucketed into intervals.
-
#key ⇒ String
Required.
-
#order_by ⇒ String
The order in which documents are returned.
-
#prefixes ⇒ Array<String>
Only get facet values that start with the given string prefix.
-
#restricted_values ⇒ Array<String>
Only get facet for the given restricted values.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpecFacetKey
constructor
A new instance of GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpecFacetKey.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpecFacetKey
Returns a new instance of GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpecFacetKey.
16212 16213 16214 |
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 16212 def initialize(**args) update!(**args) end |
Instance Attribute Details
#case_insensitive ⇒ Boolean Also known as: case_insensitive?
True to make facet keys case insensitive when getting faceting values with
prefixes or contains; false otherwise.
Corresponds to the JSON property caseInsensitive
16160 16161 16162 |
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 16160 def case_insensitive @case_insensitive end |
#contains ⇒ 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.
Corresponds to the JSON property contains
16169 16170 16171 |
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 16169 def contains @contains end |
#intervals ⇒ Array<Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1betaInterval>
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.
Corresponds to the JSON property intervals
16176 16177 16178 |
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 16176 def intervals @intervals end |
#key ⇒ String
Required. Supported textual and numerical facet keys in Document object, over
which the facet values are computed. Facet key is case-sensitive.
Corresponds to the JSON property key
16182 16183 16184 |
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 16182 def key @key end |
#order_by ⇒ 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.
Corresponds to the JSON property orderBy
16192 16193 16194 |
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 16192 def order_by @order_by end |
#prefixes ⇒ 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.
Corresponds to the JSON property prefixes
16201 16202 16203 |
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 16201 def prefixes @prefixes end |
#restricted_values ⇒ 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.
Corresponds to the JSON property restrictedValues
16210 16211 16212 |
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 16210 def restricted_values @restricted_values end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
16217 16218 16219 16220 16221 16222 16223 16224 16225 |
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 16217 def update!(**args) @case_insensitive = args[:case_insensitive] if args.key?(:case_insensitive) @contains = args[:contains] if args.key?(:contains) @intervals = args[:intervals] if args.key?(:intervals) @key = args[:key] if args.key?(:key) @order_by = args[:order_by] if args.key?(:order_by) @prefixes = args[:prefixes] if args.key?(:prefixes) @restricted_values = args[:restricted_values] if args.key?(:restricted_values) end |