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: what's replacement of FieldCache in Lucene 7
Date Thu, 12 Apr 2018 11:57:52 GMT
Hello,

Doc values should be used instead of the field cache indeed. Note that this
require to add them to your documents at index time, eg. with a
NumericDocValuesField.

Regarding random access, maybe you can use the advanceExact API, which
exists on all doc-value iterators. Just make sure to never call it on
decreasing doc IDs. If that doesn't work for you, can you describe you
use-case, maybe there are better ways to implement what you need.

Le jeu. 12 avr. 2018 à 13:54, Yonghui Zhao <zhaoyonghui@gmail.com> a écrit :

> Hi,
>
> I am upgrading my project from Lucene 4 to 7.
>
> FieldCache is removed in lucene 7,  DocValue is replacement?
>
> But seems DocValue doesn't support random access.
>
> I need random access to get some specified field value quickly.
>
> So how to solve it?
>

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