lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roman Chyla <>
Subject Re: The most efficient way to get un-inverted view of the index?
Date Wed, 17 Aug 2016 17:22:43 GMT
Joel, thanks, but which of them? I've counted at least 4, if not more,
different ways of how to get DocValues. Are there many functionally
equal approaches just because devs can't agree on using one api? Or is
there a deeper reason?

Btw, the FieldCache is still there - both in lucene (to be deprecated)
and in solr; but became package accessible only

This is what removed the FieldCache:
This is what followed:

And there is still code which un-inverts data from an index if no
doc-values are available.


On Tue, Aug 16, 2016 at 9:54 PM, Joel Bernstein <> wrote:
> You'll want to use org.apache.lucene.index.DocValues. The DocValues api has
> replaced the field cache.
> Joel Bernstein
> On Tue, Aug 16, 2016 at 8:18 PM, Roman Chyla <> wrote:
>> I need to read data from the index in order to build a special cache.
>> Previously, in SOLR4, this was accomplished with FieldCache or
>> DocTermOrds
>> Now, I'm struggling to see what API to use, there is many of them:
>> on lucene level:
>> UninvertingReader.getNumericDocValues (and others)
>> <IndexReader>.getNumericValues()
>> MultiDocValues.getNumericValues()
>> MultiFields.getTerms()
>> on solr level:
>> reader.getNumericValues()
>> UninvertingReader.getNumericDocValues()
>> and extensions to FilterLeafReader - eg. very intersting, but
>> undocumented facet accumulators (ex: NumericAcc)
>> I need this for solr, and ideally re-use the existing cache [ie. the
>> special cache is using another fields so those get loaded only once
>> and reused in the old solr; which is a win-win situation]
>> If I use reader.getValues() or FilterLeafReader will I be reading data
>> every time the object is created? What would be the best way to read
>> data only once?
>> Thanks,
>> --roman

View raw message