Class: Google::Apis::CloudsearchV1::FacetOptions

Inherits:
Object
  • Object
show all
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

Specifies operators to return facet results for. There will be one FacetResult for every source_name/object_type/operator_name combination.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ FacetOptions

Returns a new instance of FacetOptions.



3374
3375
3376
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 3374

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#integer_faceting_optionsGoogle::Apis::CloudsearchV1::IntegerFacetingOptions

Used to specify integer faceting options. Corresponds to the JSON property integerFacetingOptions



3348
3349
3350
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 3348

def integer_faceting_options
  @integer_faceting_options
end

#num_facet_bucketsFixnum

Maximum number of facet buckets that should be returned for this facet. Defaults to 10. Maximum value is 100. Corresponds to the JSON property numFacetBuckets

Returns:

  • (Fixnum)


3354
3355
3356
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 3354

def num_facet_buckets
  @num_facet_buckets
end

#object_typeString

If object_type is set, only those objects of that type will be used to compute facets. If empty, then all objects will be used to compute facets. Corresponds to the JSON property objectType

Returns:

  • (String)


3360
3361
3362
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 3360

def object_type
  @object_type
end

#operator_nameString

The name of the operator chosen for faceting. @see cloudsearch. SchemaPropertyOptions Corresponds to the JSON property operatorName

Returns:

  • (String)


3366
3367
3368
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 3366

def operator_name
  @operator_name
end

#source_nameString

Source name to facet on. Format: datasources/source_id If empty, all data sources will be used. Corresponds to the JSON property sourceName

Returns:

  • (String)


3372
3373
3374
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 3372

def source_name
  @source_name
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3379
3380
3381
3382
3383
3384
3385
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 3379

def update!(**args)
  @integer_faceting_options = args[:integer_faceting_options] if args.key?(:integer_faceting_options)
  @num_facet_buckets = args[:num_facet_buckets] if args.key?(:num_facet_buckets)
  @object_type = args[:object_type] if args.key?(:object_type)
  @operator_name = args[:operator_name] if args.key?(:operator_name)
  @source_name = args[:source_name] if args.key?(:source_name)
end