Class: Eson::Search::Field

Inherits:
Object
  • Object
show all
Includes:
Query
Defined in:
lib/eson/search/field.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Query

included, #method_missing

Constructor Details

#initialize(options = {}) ⇒ Field

Returns a new instance of Field.



11
12
13
# File 'lib/eson/search/field.rb', line 11

def initialize(options = {})
  self.options = options
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Eson::Search::Query

Instance Attribute Details

#optionsObject

Returns the value of attribute options.



9
10
11
# File 'lib/eson/search/field.rb', line 9

def options
  @options
end

Instance Method Details

#field { ... } ⇒ self

Generates a ‘field` query in a query context.

Yields:

  • the block containing further options and subqueries

Returns:

  • (self)

    the generated facet



7
# File 'lib/eson/search/field.rb', line 7

short_name :field