lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adrien Grand <jpou...@gmail.com>
Subject Re: Indexing a Date/DateTime/Time field in Lucene 4
Date Wed, 05 Apr 2017 13:04:18 GMT
Hi Frederik,

Both options would work but LongField (or LongPoint on Lucene 6.0+) would
indeed provide better performance for range queries. If you need to sort or
aggregate date values, you might also want to add a NumericDocValuesField.

Le mer. 5 avr. 2017 à 14:38, Frederik Van Hoyweghen <
frederik.vanhoyweghen@chapoo.com> a écrit :

> Hey everyone,
>
> I'm seeing some conflicting suggestions concerning the type of field to use
> for indexing a Date/DateTime/Time value.
>
> Some suggest conversion using DateTools.timeToString() and using a
> StringField,
> while others suggest using the long value of getTime() and using a
> LongField (this is supposed to perform better using NumericRangeQuery).
>
> What are your opinions on this?
>
> Kind regards,
> Frederik
>

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