Class: Eson::Search::CustomBoostFactor

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

Instance Attribute Summary collapse

Attributes included from Queries

#queries

Instance Method Summary collapse

Methods included from Query

included, #method_missing

Methods included from Queries

#queries?, register, #to_query_hash

Constructor Details

#initialize(options = {}) ⇒ CustomBoostFactor

Returns a new instance of CustomBoostFactor.



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

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.



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

def options
  @options
end

Instance Method Details

#custom_boost_factor { ... } ⇒ self

Generates a ‘custom_boost_factor` query in a query context.

Yields:

  • the block containing further options and subqueries

Returns:

  • (self)

    the generated facet



9
# File 'lib/eson/search/custom_boost_factor.rb', line 9

short_name :custom_boost_factor