lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Ryan <mr...@moreover.com>
Subject RE: facet by "in the past" and "in the future"
Date Thu, 18 Oct 2012 21:40:20 GMT
This should do it:
facet=true&facet.query=yourDateField:([* TO NOW/DAY-1MILLI])&facet.query=yourDateField:([NOW/DAY
TO *])

-Michael

-----Original Message-----
From: Paul [mailto:paul@nines.org] 
Sent: Thursday, October 18, 2012 5:28 PM
To: solr-user@lucene.apache.org
Subject: facet by "in the past" and "in the future"

I have some documents that contain a date field. I'd like to set up a
facet that groups the dates in two buckets: 1) before today, 2) today
and in the future.

It seems like I should be using range faceting, but I don't see how to
set up the parameters. Is there another way to get what I want?

The way my user interface will look is:

Status
----------
[x] Open (26)
[ ] Closed (127)

Where "open" will be all the documents that don't have a date in the past.

Thanks!

Mime
View raw message