lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vijay Santhanam" <>
Subject Multiple time ranges in a document
Date Sun, 18 Feb 2007 23:43:39 GMT


I'm using a RangeFilter to find "Event" documents (with Start and End lucene
friendly formatted date fields) that match a Users time range query. This
works perfectly in sub-second times at decent loads, but I'm having trouble
searching multiple performances in the one document. Indexing them is no
problem, because I can add extra terms to the start and end fields.


Here's a situation that doesn't work to well with the RangeFilter:-


Let's say a comedian has a regular gig every Monday for the next 3 weeks,
from 7pm-9pm. So, the start field will be 200702191900, 200702261900,
200703051900. And, the end field will be 200702192100, 200702262100,

If someone searches for an event on Thursday anytime during his 3 week
stint, the comedian's event will show up, because the Range Filter will
consider the lowest term of the start field and the highest term of the end


Also, sorting by start or end fields will break, but I could write my own
SortComparatorSource to fix that.


How could I get around the filter problem? I could write my own filter, but
it would need to keep track of both fields, and their respective term
positions for each field.


Thanks for your help,



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