You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Vincent Pérès <vi...@gmail.com> on 2008/10/30 10:37:02 UTC
How to get the min and max values from facets?
Hello,
I'm using Solr 1.3. I would like to get only minimum and maximum values from
a facet.
In fact I'm using a range to get the results : [value TO value], and I don't
need to get the facets list in my XML results (which could be more than
hundred thousands)... so, I have to display the range (minimum and maximum
values) from a facet. Is there any way to do that?
I found the new statistics components, follow the link :
http://wiki.apache.org/solr/StatsComponent
But it's for solr 1.4.
Does anyone have any idea?
Thank you !
Vincent
--
View this message in context: http://www.nabble.com/How-to-get-the-min-and-max-values-from-facets--tp20243462p20243462.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: How to get the min and max values from facets?
Posted by Chris Hostetter <ho...@fucit.org>.
: myfacet, ASC, limit 1
: myfacet, DESC, limit 1
: So I can get the first value and the last one.
:
: Do you think I will get more performance with this way than using stats?
I'm guessing that by all measurable metrics, the StatsComponent will blow
that out of the water -- i was just putting it out there as a possible
alternative if you didn't feel comfortable enough with java to compile the
StatsComponent and use it with Solr 1.3.
-Hoss
Re: How to get the min and max values from facets?
Posted by Vincent Pérès <vi...@gmail.com>.
Hello,
Yes I understand, like :
myfacet, ASC, limit 1
myfacet, DESC, limit 1
So I can get the first value and the last one.
Do you think I will get more performance with this way than using stats?
Thanks !
Vincent
--
View this message in context: http://www.nabble.com/How-to-get-the-min-and-max-values-from-facets--tp20243462p20252126.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: How to get the min and max values from facets?
Posted by Chris Hostetter <ho...@fucit.org>.
: hundred thousands)... so, I have to display the range (minimum and maximum
: values) from a facet. Is there any way to do that?
: I found the new statistics components, follow the link :
: http://wiki.apache.org/solr/StatsComponent
: But it's for solr 1.4.
there haven't been many changes on the trunk since 1.3 that StatsComponent
would depend on, you can probably use it as is.
: Does anyone have any idea?
assuming the field you want the min/max for are stored, you can do
multiple hits sorted on that field to get the highest and lowest value.
-Hoss