lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scott Smith" <>
Subject Getting results for a specific date
Date Tue, 16 Jun 2009 23:41:25 GMT
Mostly, our users want to see search results in reverse date order
(newer hits first).  I know how to do that with a Sort object and it
works fine.


However, sometimes our users want to do a search and get results in date
order starting at a certain date.  Say for example, they want to start
their search with documents on June 10.  That wouldn't be a big deal
except that once they display the first page of results for June 10,
they may page in either direction.  What I mean by this is that they may
continue looking at older stories from June 10 or (the problematic case)
they might page to look at newer stories on June 9.


So, a single date range query doesn't seem to me to quite cut it.  My
solution has been to set up two queries-one with the date range of "June
10 or older" and one with a date range of "newer than June 10".  I think
that will work, but it's a bit of a juggling act.


Does anyone have a better solution?

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message