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.
3175 3176 3177 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 3175 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
3152 3153 3154 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 3152 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
3161 3162 3163 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 3161 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
3173 3174 3175 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 3173 def possible_values @possible_values end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
3180 3181 3182 3183 3184 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 3180 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 |