Re: How to return a function result instead of doclist in the Solr collapsing/grouping feature?

2011-09-14 Thread Erick Erickson
Well, what is the average of latitude and longitude? If you're asking
for the average of all the docs that match, or the average of all the
docs in the corpus, no, I don't think you can unless you write a custom
plugin.

Something like this has been talked about, see:
 https://issues.apache.org/jira/browse/SOLR-1622
but I don't think any such thing has been implemented.

Best
Erick

On Mon, Sep 12, 2011 at 5:37 PM, Pablo Ricco pri...@gmail.com wrote:
 I have the following solr fields in schema.xml:

   - id (string)
   - name (string)
   - category(string)
   - latitude (double)
   - longitude(double)

 Is it possible to make a query that groups by category and returns the
 average of latitude and longitude instead of the doclist?

 Thanks,
 Pablo



How to return a function result instead of doclist in the Solr collapsing/grouping feature?

2011-09-12 Thread Pablo Ricco
I have the following solr fields in schema.xml:

   - id (string)
   - name (string)
   - category(string)
   - latitude (double)
   - longitude(double)

Is it possible to make a query that groups by category and returns the
average of latitude and longitude instead of the doclist?

Thanks,
Pablo