问题
I understand that DSE 5.1 runs Solr 6.0 version. I am trying to use facet.pivot feature using Solr local paramater, but it does not seem to be working.
My data is as follows Simple 4 fields
What I need is to group the result by name field so as to get sum(money) for each Year. I believe facet.pivot with local parameter can solve but not working with DSE 5.1.
From:Solr documentation Combining Stats Component With Pivots In addition to some of the general local parameters supported by other types of faceting, a stats local parameters can be used with facet.pivot to refer to stats.field instances (by tag) that you would like to have computed for each Pivot Constraint.
Here is what I want to use. stats=true&stats.field={!tag=piv1}money&facet=true&facet.pivot={!stats=piv1}name
回答1:
If you're trying to execute these queries from solr_query within CQL, the stats component is not supported. We keep the faceting to simple parameters as the purpose is to provide more GROUP By type functionality in solr_query, not analytics.
With DSE 5.1 (Solr 6.0.1), and the desire for analytics with Solr, use the HTTP's JSON Facet API from Solr. It has replaced the stats component and provides what you are looking for in a more robust fashion.
来源:https://stackoverflow.com/questions/48503266/does-datastax-dse-5-1-search-support-solr-local-paramater-as-used-in-facet-pivot