Method: SearchFlip::Customable#custom
- Defined in:
- lib/search_flip/customable.rb
#custom(hash) ⇒ SearchFlip::Criteria
Note:
Use with caution, because using #custom will potentiall override other sections like aggregations, query, sort, etc if you use the the same section names.
Adds a fully custom field/section to the request, such that upcoming or minor Elasticsearch features as well as other custom requirements can be used without having yet specialized criteria methods.
28 29 30 31 32 |
# File 'lib/search_flip/customable.rb', line 28 def custom(hash) fresh.tap do |criteria| criteria.custom_value = (custom_value || {}).merge(hash) end end |