Class: MmEsSearch::Api::Query::ConstantScoreQuery

Inherits:
AbstractQuery
  • Object
show all
Defined in:
lib/mm_es_search/api/query/constant_score_query.rb

Instance Method Summary collapse

Methods inherited from AbstractQuery

#es_abs_field, #mongo_abs_field, #path_and_index, #to_filter

Instance Method Details

#to_es_queryObject



16
17
18
19
20
21
22
23
24
25
# File 'lib/mm_es_search/api/query/constant_score_query.rb', line 16

def to_es_query
  
  constant_score_params = {
    :query => query.to_es_query
  }
  constant_score_params.merge!(:boost => boost) if boost?
      
  return {:constant_score => constant_score_params}
  
end

#to_mongo_query(options = {}) ⇒ Object



10
11
12
13
14
# File 'lib/mm_es_search/api/query/constant_score_query.rb', line 10

def to_mongo_query(options = {})
  
  return query.to_mongo_query(options)
  
end