Class: MmEsSearch::Api::Query::DismaxQuery
Instance Method Summary
collapse
#es_abs_field, #mongo_abs_field, #path_and_index, #to_filter
Instance Method Details
#to_es_query ⇒ Object
15
16
17
18
19
20
21
22
23
|
# File 'lib/mm_es_search/api/query/dismax_query.rb', line 15
def to_es_query
dismax_params = {:queries => queries.map(&:to_es_query)}
dismax_params.merge!(:tie_breaker => tie_breaker) if tie_breaker?
dismax_params.merge!(:boost => boost) if boost?
return {:dis_max => dismax_params}
end
|
#to_mongo_query(options = {}) ⇒ Object
11
12
13
|
# File 'lib/mm_es_search/api/query/dismax_query.rb', line 11
def to_mongo_query(options = {})
raise 'Dis Max Query cannot be run as a mongo query'
end
|