lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chitra R <chithu.r...@gmail.com>
Subject Re: SortedNumericDocValuesFIeld
Date Fri, 27 May 2016 09:48:12 GMT
Hi,
     Actually I like to print the sorted numeric list from the
sortedDocValues and I dont know which api have to use . Could you please
help me to achieve this?


Thanks,
Chitra

On Thu, May 26, 2016 at 8:17 PM, Michael McCandless <
lucene@mikemccandless.com> wrote:

> This looks about right ... did something go wrong?
>
> Mike McCandless
>
> http://blog.mikemccandless.com
>
> On Thu, May 26, 2016 at 9:29 AM, Chitra R <chithu.r111@gmail.com> wrote:
>
> > Hi,
> >       I am new to lucene. Anyone please explain how to sort the numeric
> > values by SortedNumericDocValuesField?
> >
> > I tried like this using Lucene 4.10.4:
> >
> > doc.add(new SortedNumericDocValuesField("Numericdoc_price", 1L));
> > doc.add(new SortedNumericDocValuesField("Numericdoc_price", 15L));
> > ..
> >  for (AtomicReaderContext context : indexReader.leaves()) {
> >             AtomicReader atomicReader = context.reader();
> >  SortedNumericDocValues
> >  sortedDocValues=DocValues.getSortedNumeric(atomicReader,
> > "Numericdoc_price");
> > }
> >
> >
> >
> >
> >
> > Thanks,
> > Chitra
> >
>

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