On Jun 28, 2004, at 11:17 AM, Kevin Burton wrote:
Otis Gospodnetic wrote:

Hello,

The standard answer to this question is:
If you don't need your dates to be very precise, trim milliseconds. Trim more (e.g. seconds) if that information is not relevant.



So the question is should use store this data in the lucene date field or as millis with padding...

We have the same issue.

It all depends on what granularity you care about. If your application only cares about year, month, and day, then I recommend indexing dates literally as text YYYYMMDD format, which allows you to query by year (or year and month, or year, month, and day) quite efficiently.


If you care about milliseconds, you will need to determine how best to handle this when it comes to querying. A RangeQuery on tons of documments that all within the date range is an issue that deserves consideration and you may need to do some cached filters in order to facilitate such things.

        Erik


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



Reply via email to