theablefew / stretchy

Elasticsearch Models for Rails with an ActiveRecord-like behavior
https://theablefew.github.io/stretchy/#/
MIT License
2 stars 0 forks source link

Array arguments for aggregations and filters #10

Open esmarkowski opened 8 months ago

esmarkowski commented 8 months ago

.aggregation and .filter support receiving arguments as an array.

It's rarely used except when constructing dynamic aggs and filters. However, just need some tests making sure it still works.

### Tasks
- [ ] Documentation
- [ ] Tests
esmarkowski commented 8 months ago

Should allow:

Model.aggregation({:route=>{:terms=>{:field=>:route}, :aggs=>{:operator=>{:terms=>{:field=>:operator}}}}})

As a direct pass-through