ruby - ElasticSearch SearchKick multiple aggs with options in same query -
in searchkick documentation there 2 ways/styles of requesting aggs mentioned.
for simple (multiple) agg requests:
products = product.search "chuck taylor", aggs: [:product_type, :gender, :brand]
and agg requests options:
product.search "wingtips", aggs: {size: {where: {color: "brandy"}}}
my question - how go declaring multiple aggs options? we've tried various combinations of 2 without success...
for example - doesn't work...
products = product.search "chuck taylor", aggs: [:product_type, {size: {where: {color: "brandy"}}}]
is ruby formatting problem? or limitation in gem?
thanks guys!
for looking answer:
you can do:
products = product.search "chuck taylor", aggs: {product_type: {}, size: {where: {color: "brandy"}}}
Comments
Post a Comment