Function in facet.query like min,max

2012-01-17 Thread Eric Grobler
Hi Solr community, Is it possible to return the lowest, highest and average price of a search result using facets? I tried something like: facet.query={!max(price,0)} Is it possible and what is the correct syntax? q=htc android facet=true facet.query=price:[* TO 10] facet.query=price:[11 TO 100]

Re: Function in facet.query like min,max

2012-01-17 Thread Erick Erickson
have you seen the Stats component? See: http://wiki.apache.org/solr/StatsComponent Best Erick On Tue, Jan 17, 2012 at 8:34 AM, Eric Grobler impalah...@googlemail.com wrote: Hi Solr community, Is it possible to return the lowest, highest and average price of a search result using facets? I

Re: Function in facet.query like min,max

2012-01-17 Thread Eric Grobler
Yes, I have, but unfortunately it works on the whole index and not for a particular query. On Tue, Jan 17, 2012 at 3:37 PM, Erick Erickson erickerick...@gmail.comwrote: have you seen the Stats component? See: http://wiki.apache.org/solr/StatsComponent Best Erick On Tue, Jan 17, 2012 at

Re: Function in facet.query like min,max

2012-01-17 Thread Erick Erickson
I don't believe that's the case, have you tried it? From the page I referenced: The stats component returns simple statistics for indexed numeric fields within the DocSet. And running a very quick test on the example data, I get different results when I used *:* and name:maxtor. That said, I'm

Re: Function in facet.query like min,max

2012-01-17 Thread Eric Grobler
Hi Erick Thanks for your feedback. I will try it tomorrow - if it works it will be perfect for my needs. Have a nice day Ericz On Tue, Jan 17, 2012 at 4:28 PM, Erick Erickson erickerick...@gmail.comwrote: I don't believe that's the case, have you tried it? From the page I referenced: The