I guess you could do it in a custom Collector. They get passed readers and docids so you could do the lookups and comparison. There will be performance implications that you may be able to minimise via FieldCache.
Storing the result in the index sounds much more sensible. -- Ian. On Mon, Jan 23, 2012 at 10:33 AM, Jamie <ja...@stimulussoft.com> wrote: > Hi Everyone > > I have a problem where I need to compare two indexed fields as part of a > query. > > For instance: modified_date[1970 to 2012] AND NOT deleted_date>modified_date > > how would one implement this using Lucene? > > Bear in mind, I need a dynamic way of accomplishing this comparison. > > In my case, it is not possible to store the result of > deleted_date>modified_date at the time of indexing. > > Thanks > > Jamie > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > For additional commands, e-mail: java-user-h...@lucene.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org