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"}}}

https://github.com/ankane/searchkick/issues/689


Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -