Method: Tire::Search::Query#term
- Defined in:
- lib/tire/search/query.rb
#term(field, value, options = {}) ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/tire/search/query.rb', line 12 def term(field, value, ={}) query = if value.is_a?(Hash) { field => value.to_hash } else { field => { :term => value }.update() } end @value = { :term => query } end |