Class: MmEsSearch::Api::Query::QueryFilter

Inherits:
AbstractQuery show all
Defined in:
lib/mm_es_search/api/query/query_filter.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



15
16
17
18
19
20
21
# File 'lib/mm_es_search/api/query/query_filter.rb', line 15

def to_es_query
  query_params = {
    :query => query.to_es_query
  }
  query_params[:_cache] = cache unless cache.nil?
  {:fquery => query_params}
end

#to_mongo_queryObject



11
12
13
# File 'lib/mm_es_search/api/query/query_filter.rb', line 11

def to_mongo_query
  query.to_mongo_query
end