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.



1111
1112
1113
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 1111

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

Instance Attribute Details

#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)


1091
1092
1093
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 1091

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)


1097
1098
1099
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 1097

def object_type
  @object_type
end

#operator_nameString

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

Returns:

  • (String)


1103
1104
1105
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 1103

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)


1109
1110
1111
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 1109

def source_name
  @source_name
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1116
1117
1118
1119
1120
1121
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 1116

def update!(**args)
  @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