Hi,

I'm a new solr user, I wanted to know is there any way to apply sum on a
field in a result document of group query?

Following is the query and its result set, I wanted to apply sum on 'price'
filed grouping on type:


*Sample input:*

<doc>
<str name="id">3</str>
<str name="type">Caffe</str>
<str name="content">Yummm  Drinking a latte at Caffe Grecco in SF shistoric
North Beach Learning text analysis with SolrInAction by Manning on my
iPad</str>
<long name="_version_">1440257540658036736</long>
<int name="price">250</int>
</doc>
<doc>
<str name="id">1</str>
<str name="type">Caffe</str>
<str name="content">Yummm  Drinking a latte at Caffe Grecco in SF shistoric
North Beach Learning text analysis with SolrInAction by Manning on my
iPad</str>
<long name="_version_">1440257592044552192</long>
<int name="price">100</int>
</doc>
*
*
*Query:*
http://localhost:8080/solr/collection2/select?q=caffe&df=content&group=true&group.field=type

your help will be greatly appreciated!

Regards,
Jamshaid

Reply via email to