We would like to show the average value of a number column that is part of the search results. Possibly in a Custom Search block.
Is there already a way to do this (which i then missed), or what would be the best approach to implement this?
We would like to show the average value of a number column that is part of the search results. Possibly in a Custom Search block.
Is there already a way to do this (which i then missed), or what would be the best approach to implement this?
Comments
Comment #1
batje commentedI came across this page (for Solr) that pretty much describes that (at least) Solr can do exactly this.
That page also describes these statistics can be loaded on a per facet basis. There is also an issue for this in the facetapi queue.
Comment #2
nick_vhStats component in solr 3 is now fully json compatible. In the Apache Solr we use it for the range query facet type. I'm sure we can utilize this in Search API but it's more a solr feature. I'm not sure how it would translate back to mysql or to the backend but it's not impossible.
Would you be able to provide a better example and perhaps some sketchup how you would like this to work? Also moving it up to D8
Comment #3
legolasboThis issue has not seen activity in over 2,5 years. I am therefore closing this issue to clean up the issue queue. Feel free to re-open and update this issue if you feel this issue is still relevant and of importance.