Method: SearchFlip::Filterable#range
- Defined in:
- lib/search_flip/filterable.rb
#range(field, options = {}) ⇒ SearchFlip::Criteria
Adds a range filter to the criteria without being forced to specify the left and right end of the range, such that you can eg simply specify lt, lte, gt and gte. For fully specified ranges, you can as well use #where, etc. Check out the Elasticsearch docs for further details regarding the range filter.
206 207 208 |
# File 'lib/search_flip/filterable.rb', line 206 def range(field, = {}) filter(range: { field => }) end |