lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <luc...@mikemccandless.com>
Subject Re: Best way to do time sort
Date Mon, 13 Mar 2017 15:44:48 GMT
Doc values (your option 3) is the right way to sort by time.  Index it with
whatever precision you need, e.g. msec since epoch as a long
NumericDocValuesField.

Mike McCandless

http://blog.mikemccandless.com

On Mon, Mar 13, 2017 at 9:53 AM, aravinth thangasami <
aravinththangasami@gmail.com> wrote:

> I am indexing a time field. I need to get the latest results and my index
> contains millions of documents with frequent updates almost 90% of the
> index updates.
>
>
> option 1:
>
> To index the time as string
>
> option 2:
>
> To index the time field as Number
>
> option 3:
>
> To index the time field as DocValue
>
>
> Which option will be the best approach ??
>
>
> Thanks
> Aravinth
>

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