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: Difference in Retrieving values of a docvalue field using atomicreader over duplicate StoredField
Date Fri, 03 Jun 2016 18:21:54 GMT
You're welcome!

Mike McCandless

http://blog.mikemccandless.com

On Fri, Jun 3, 2016 at 10:20 AM, Kumaran Ramasubramanian <kums.134@gmail.com
> wrote:

> Thanks a lot for the clarification mike :-)
>
>
>
> --
> *​*​
> Kumaran R
>
>
>
>
> On Thu, Jun 2, 2016 at 2:38 AM, Michael McCandless <
> lucene@mikemccandless.com> wrote:
>
> > Well, each access may involve disk seeks (if the pages are not already
> hot
> > in the OS's IO cache).
> >
> > So if you do some doc values + some stored fields you're looking at
> > multiple seeks per docID you retrieve.
> >
> > Really you should only do this for a few hits, e.g. one page worth.
> >
> > Mike McCandless
> >
> > http://blog.mikemccandless.com
> >
> > On Wed, Jun 1, 2016 at 3:15 PM, Kumaran Ramasubramanian <
> > kums.134@gmail.com>
> > wrote:
> >
> > > 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