toptal / chewy

High-level Elasticsearch Ruby framework based on the official elasticsearch-ruby client
MIT License
1.88k stars 366 forks source link

Add collapse #841

Closed jkostolansky closed 2 years ago

jkostolansky commented 2 years ago

Add the collapse option to the request.

PlacesIndex.collapse(field: :name)
# => <PlacesIndex::Query {..., :body=>{:collapse=>{"field"=>:name}}}>