module ROM::Elasticsearch::QueryMethods
Dataset's query methods
@see Dataset
@api public
Public Instance Methods
get(id)
click to toggle source
Return a new dataset configured to search by :id
@param [Integer] id
@return [Dataset]
@see Relation#get
@api public
# File lib/rom/elasticsearch/query_methods.rb, line 22 def get(id) params(id: id) end
query(query)
click to toggle source
Return a new dataset configured to search via :query body option
@param [Hash] query A query hash
@return [Dataset]
@see Relation#query
@api public
# File lib/rom/elasticsearch/query_methods.rb, line 61 def query(query) body(query: query) end
query_string(expression)
click to toggle source
Return a new dataset configured to search via :query_string body option
@param [String] expression A string query
@return [Dataset]
@api public
# File lib/rom/elasticsearch/query_methods.rb, line 48 def query_string(expression) query(query_string: {query: expression}) end
search(options)
click to toggle source
Return a new dataset configured to search via new body options
@param [Hash] options Body options
@return [Dataset]
@see Relation#search
@api public
# File lib/rom/elasticsearch/query_methods.rb, line 35 def search(options) body(options) end