Class: Google::Apis::CloudsearchV1::EnumPropertyOptions
- Inherits:
-
Object
- Object
- Google::Apis::CloudsearchV1::EnumPropertyOptions
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- lib/google/apis/cloudsearch_v1/classes.rb,
lib/google/apis/cloudsearch_v1/representations.rb,
lib/google/apis/cloudsearch_v1/representations.rb
Overview
The options for enum properties, which allow you to define a restricted set of strings to match user queries, set rankings for those string values, and define an operator name to be paired with those strings so that users can narrow results to only items with a specific value. For example, for items in a request tracking system with priority information, you could define p0 as an allowable enum value and tie this enum to the operator name priority so that search users could add priority:p0 to their query to restrict the set of results to only those items indexed with the value p0.
Instance Attribute Summary collapse
-
#operator_options ⇒ Google::Apis::CloudsearchV1::EnumOperatorOptions
Used to provide a search operator for enum properties.
-
#ordered_ranking ⇒ String
Used to specify the ordered ranking for the enumeration that determines how the integer values provided in the possible EnumValuePairs are used to rank results.
-
#possible_values ⇒ Array<Google::Apis::CloudsearchV1::EnumValuePair>
The list of possible values for the enumeration property.
Instance Method Summary collapse
-
#initialize(**args) ⇒ EnumPropertyOptions
constructor
A new instance of EnumPropertyOptions.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ EnumPropertyOptions
Returns a new instance of EnumPropertyOptions.
8656 8657 8658 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 8656 def initialize(**args) update!(**args) end |
Instance Attribute Details
#operator_options ⇒ Google::Apis::CloudsearchV1::EnumOperatorOptions
Used to provide a search operator for enum properties. This is optional.
Search operators let users restrict the query to specific fields relevant to
the type of item being searched. For example, if you provide no operator for a
priority enum property with possible values p0 and p1, a query that
contains the term p0 returns items that have p0 as the value of the *
priority* property, as well as any items that contain the string p0 in other
fields. If you provide an operator name for the enum, such as priority, then
search users can use that operator to refine results to only items that have *
p0* as this property's value, with the query priority:p0.
Corresponds to the JSON property operatorOptions
8633 8634 8635 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 8633 def @operator_options end |
#ordered_ranking ⇒ String
Used to specify the ordered ranking for the enumeration that determines how
the integer values provided in the possible EnumValuePairs are used to rank
results. If specified, integer values must be provided for all possible
EnumValuePair values given for this property. Can only be used if isRepeatable
is false.
Corresponds to the JSON property orderedRanking
8642 8643 8644 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 8642 def ordered_ranking @ordered_ranking end |
#possible_values ⇒ Array<Google::Apis::CloudsearchV1::EnumValuePair>
The list of possible values for the enumeration property. All EnumValuePairs
must provide a string value. If you specify an integer value for one
EnumValuePair, then all possible EnumValuePairs must provide an integer value.
Both the string value and integer value must be unique over all possible
values. Once set, possible values cannot be removed or modified. If you supply
an ordered ranking and think you might insert additional enum values in the
future, leave gaps in the initial integer values to allow adding a value in
between previously registered values. The maximum number of elements is 100.
Corresponds to the JSON property possibleValues
8654 8655 8656 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 8654 def possible_values @possible_values end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
8661 8662 8663 8664 8665 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 8661 def update!(**args) @operator_options = args[:operator_options] if args.key?(:operator_options) @ordered_ranking = args[:ordered_ranking] if args.key?(:ordered_ranking) @possible_values = args[:possible_values] if args.key?(:possible_values) end |