Maybe you would like something like this:
lowest value:
http://localhost:8983/solr/select?q=*:*&rows=1&fl=date&sort=date%20asc
highest value:
http://localhost:8983/solr/select?q=*:*&rows=1&fl=date&sort=date%20desc
Hope this helps,
Péter
----- Original Message -----
From: "gwk" <g...@eyefi.nl>
To: <solr-user@lucene.apache.org>
Sent: Monday, May 17, 2010 11:04 AM
Subject: Re: date slider
Hi,
I'm not sure if this applies to your use case but when I was building our
faceted search (see http://www.mysecondhome.co.uk/search.html) at first I
wanted to do the same, retrieve the minimum and maximum values but when I
did the few values that were a lot higher than the others made it almost
impossible to select a reasonable range. That's why I switched to a fixed
range of reasonable values with the last option being "anything higher".
This way the resultset is spread out pretty evenly over the length of the
slider. If the values over which you want to do range selection don't vary
a lot I think this is the best option, otherwise I guess you'll have to
use another solution. Maybe if the values do change a lot but not very
often you could generate new fixed range values after updating Solr. If
you think something like what I've made is useful to you, I'll be happy to
answer any questions about how I implemented this.
Regards,
gwk
On 5/16/2010 10:07 PM, Lukas Kahwe Smith wrote:
On 16.05.2010, at 21:01, Ahmet Arslan <iori...@yahoo.com> wrote:
http://wiki.apache.org/solr/StatsComponent can give you
min and max values.
Sorry my bad, I just tested StatsComponent with tdate field. And it is
not working for date typed fields. Wiki says it is for numeric fields.
ok thx for checking. is my use case really so unusual? i guess i could
store a unix timestamp or i just do a fixed range.
hmm if i use facets with a really large gap will it always give me at
least the min and max maybe? will try it out when i get home.
regards
Lukas