lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arun Kumar K <>
Subject Lucene 4.2 Doc Vals
Date Tue, 04 Jun 2013 07:16:15 GMT
Hi Guys,

I am trying to get hands on Lucene 4.2 Doc Values (RAM Based Which is by

I have a 1GB index with 540000 documents.

When retrieving the DocVals for matched docs i am able to retrieve vals
only upto some limit around 45000 docvals only.

for (AtomicReaderContext context : reader.leaves())
    NumericDocValues vals = context.reader().getNumericDocValues("ID");
    int leafDocBase = context.docBase;
    int leafMaxDoc = context.reader().maxDoc();
    int realdocId = docId - leafDocBase;

    if (realdocId >= 0 && realdocId < leafMaxDoc)
           vals.get(docId) ;

vals.get(docid) throws java.lang.ArrayIndexOutOfBoundsException: 73
at o.a.lucene.util.packed.BlockPackedReader.get(
at lucene42.DocValSearch.main(

I am using defaults for java and lucene.

It seems that NumericDocValues doesn't have all the DocVals ? Is it because
of some RAM constraint ?
Also i didn't understand NumeriDocValues structure. Is it some HashMap
containing all vals or some Data Structure which loads data when required ?
I don't see any .length() for it.

Can someone explain ? Will it differ in case of Disk Based DocVals ?


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