Class: Queries::QueryBuilder

Inherits:
Object
  • Object
show all
Includes:
AttributesReader, AbstractQueryBuilder
Defined in:
lib/queries/query_builder.rb

Overview

Base Class for all query classes

QueryComponents
  boost: documents matching the query are boosted by
         the value

Constant Summary collapse

NAME =
'base'

Instance Method Summary collapse

Methods included from AttributesReader

#attributes

Methods included from AbstractQueryBuilder

#do_equals?, #name

Instance Method Details

#boost(value) ⇒ QueryBuilder

sets the boost value for this query

Parameters:

  • value (Numeric)

    boost value for the query

Returns:



26
27
28
29
30
31
# File 'lib/queries/query_builder.rb', line 26

def boost(value)
  raise 'boost value is nil' if value.nil?

  @boost = value
  self
end