I have a facet query working with count but I would like to do a sum on a field on the data already grouped by the facet.field. I have the json facet query working in the browser but no luck with PySolr.
import pysolr
import pprint
conn = pysolr.Solr('http://localhost:8080/solr/corename')
result = conn.search('*:*', **{
'facet': 'true',
'facet.type': 'terms',
'facet.limit': 5,
'facet.field': 'field_name',
'f.results.facet.sum': '{!func}sum(daily_amount)'
})
pprint.pprint(result.facets)
I would like to do a sum on a particualr field, is that possible in PySolr?