On Thursday, November 13, 2003, at 07:42 PM, Joseph Wilkicki wrote:
I'm having a problem with searching dates. I created two documents with the
same date, 08/27/2002, in a lastModified field and then try and search a
range lastModified:[20020827 TO 20020827] (Other, wider ranges, don't seem
to help). My understanding is that this should return my two documents
because the range is inclusive. As a related aside, I can't seem to get any
range to work properly at all. Here is a snippet of code describing what
I'm doing:

Dates require special considerations when dealing with QueryParser. By default, you need to use the short format in the default locale for the expressions:


lastModified:[08/27/2002 TO 08/27/2002]

If you want to deal with other formats, you will need to subclass QueryParser and override getRangeQuery and do your own thing there.

Erik


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to