lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kumaran Ramasubramanian <kums....@gmail.com>
Subject Difference in Retrieving values of a docvalue field using atomicreader over duplicate StoredField
Date Wed, 01 Jun 2016 19:15:13 GMT
Hi All,


In javadoc of every docvalue field
<https://lucene.apache.org/core/4_10_4/core/org/apache/lucene/document/SortedNumericDocValuesField.html>,
there is line like

​
> If you also need to store the value, you should add a separate StoredField
> <https://lucene.apache.org/core/4_10_4/core/org/apache/lucene/document/StoredField.html>
>  instance.​


https://lucene.apache.org/core/4_10_4/core/org/apache/lucene/document/SortedNumericDocValuesField.html




But, we are able to retrieve the value of SortedNumericDocValuesField
using AtomicReader also

for (AtomicReaderContext context : indexReader.leaves())
> {
>  AtomicReader atomicReader = context.reader();
>  SortedNumericDocValues
>  sortedDocValues=DocValues.getSortedNumeric(atomicReader, "Numeric
> ​_docvalue​
> _price");
> }


​So what is the difference actually? Is there any performance or time taken
issue in retrieving values of a docvalue field using atomicreader over
StoredField? ​

Please clarify me what am i missing?​

Thanks in advance


​--​

Kumaran R

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