QueryParser can parse input like [01.01.2005 TO 15.01.2005] if the German
locale is activated ("01.01.2005" is the way 2005-01-01 is usually written
in Germany). By "can parse" I mean that the date is recognized and
automatically turned into the format used by DateField (like "0e9eodds0").
There are two problems with that:
1.) We now have DateField and DateTools which use different formats. So
QueryParser needs to know which one has been used during indexing. I've a
local patch that adds an appropriate set... method.
2.) Range queries with [...] are supposed to be inclusive, but that doesn't
work as the use will expect with dates if the resolution of the query is
less than the indexing resolution. So if someone queries for [01.01.2005
TO 15.01.2005] he expects to get documents from 15.01.2005, too. The index
might contain fields like 2005011520015 (i.e. 2005-01-15 20:15) for this,
but the query is turned into [20050101 TO 20050115], so that document is
not found.
Does anybody have any idea how to solve problem 2.? You cannot just set the
time to 23:59:59 because with the current implementation you cannot tell
whether the time was specified by the user.
Regards
Daniel
--
http://www.danielnaber.de
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org