Class: Couchbase::SearchFacet::SearchFacetTerm

Inherits:
Object
  • Object
show all
Defined in:
lib/couchbase/search_options.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(field) {|_self| ... } ⇒ SearchFacetTerm

Returns a new instance of SearchFacetTerm.

Parameters:

  • field (String)

    name of the field

Yields:

  • (_self)

Yield Parameters:



1289
1290
1291
1292
# File 'lib/couchbase/search_options.rb', line 1289

def initialize(field)
  @field = field
  yield self if block_given?
end

Instance Attribute Details

#fieldString (readonly)

Returns:

  • (String)


1283
1284
1285
# File 'lib/couchbase/search_options.rb', line 1283

def field
  @field
end

#sizeInteger

Returns:

  • (Integer)


1286
1287
1288
# File 'lib/couchbase/search_options.rb', line 1286

def size
  @size
end

Instance Method Details

#to_json(*args) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



1295
1296
1297
# File 'lib/couchbase/search_options.rb', line 1295

def to_json(*args)
  {field: field, size: size}.to_json(*args)
end