Statistics field in component statistics

In my project, I need statistics for two fields on the solr stats factor. Can I add two parameters to the statistics field and statistics at the same time?

+4
source share
1 answer

According to the StatsComponent, you can pass stats.field several times to get them all at the same request, for example. stats.field=price&stats.field=popularity

 eg http://localhost:8983/solr/select?q=*:*&stats=true&stats.field=price&stats.field=popularity&rows=0&indent=true 

You can also pass multiple facet fields, for example. stats.facet=inStock&stats.facet=popularity

+1
source

Source: https://habr.com/ru/post/1501827/


All Articles