Class: Eson::Search::Terms

Inherits:
Object
  • Object
show all
Includes:
Facet, Filter, Query
Defined in:
lib/eson/search/terms.rb

Instance Attribute Summary collapse

Attributes included from Facet

#args, #scope_name

Instance Method Summary collapse

Methods included from Facet

included, #method_missing, #param, #scope

Methods included from Filter

included, #method_missing

Methods included from Query

included, #method_missing

Constructor Details

#initialize(options = {}) ⇒ Terms

Returns a new instance of Terms.



15
16
17
# File 'lib/eson/search/terms.rb', line 15

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::Facet

Instance Attribute Details

#fieldObject

Returns the value of attribute field.



13
14
15
# File 'lib/eson/search/terms.rb', line 13

def field
  @field
end

#optionsObject

Returns the value of attribute options.



13
14
15
# File 'lib/eson/search/terms.rb', line 13

def options
  @options
end

Instance Method Details

#terms { ... } ⇒ self #terms { ... } ⇒ self #terms { ... } ⇒ self

Overloads:

  • #terms { ... } ⇒ self

    Generates a ‘terms` filter in a filter context.

    Yields:

    • the block containing further options and subfilters

    Returns:

    • (self)

      the generated facet

  • #terms { ... } ⇒ self

    Generates a ‘terms` query in a query context.

    Yields:

    • the block containing further options and subqueries

    Returns:

    • (self)

      the generated facet

  • #terms { ... } ⇒ self

    Generates a ‘terms` facet in a facets context.

    Yields:

    • the block describing further options

    Returns:

    • (self)

      the generated facet



11
# File 'lib/eson/search/terms.rb', line 11

short_name :terms