Package org.apache.lucene.index

Examples of org.apache.lucene.index.DocValuesReader


    log.info("makeInit start:" + uni.field + " ,this.baseAdvanceDocs="+(uni.baseAdvanceDocs==null?0:uni.baseAdvanceDocs.size()));
    int maxDoc = reader.maxDoc();
    uni.startRamDocValue(maxDoc, reader, isreadDouble);
    long t4=System.currentTimeMillis();

    DocValuesReader docvalues=reader.getDocValues();
    int maxtm=RamDocValueFill.Fill(uni,reader.maxDoc(), true, uni.ti, docvalues, fieldNumber, isreadDouble, uni.baseAdvanceDocs);
    long t5=System.currentTimeMillis();
 
    uni.endRamDocValue(isreadDouble,maxtm);
    uni.tnr = uni.ramDocValue.getDocReader();
View Full Code Here


    log.info("addDoclist start" + uni.field + " ,this.baseAdvanceDocs="+(uni.baseAdvanceDocs==null?0:uni.baseAdvanceDocs.size()));

    uni.baseAdvanceDocs = UnInvertedField.ajustBase(4,tmp, reader);

    DocValuesReader docvalues = reader.getDocValues();
    RamDocValueFill.Fill(uni, reader.maxDoc(),false, uni.ti, docvalues, fieldNumber, isreadDouble,uni.baseAdvanceDocs);
    uni.baseAdvanceDocs=null;

    return true;
  }
View Full Code Here

      boolean isReadDouble, BitDocSet baseAdvanceDocs)
      throws IOException, CloneNotSupportedException {
    long l0=System.currentTimeMillis();

    boolean isreadText=isinit&&(!isReadDouble);
    DocValuesReader docValues = (DocValuesReader) quicktisInput.clone();
      docValues.seekTo(fieldNumber,isreadText );
      int doc = -1;
      int tm = 0;
      long l1=System.currentTimeMillis();

      if (inv.fieldDataType == FieldDatatype.d_double) {
        if (baseAdvanceDocs != null) {
          DocIterator iter = baseAdvanceDocs.iterator();
          while (iter.hasNext()) {
            doc = iter.nextDoc();
            tm = docValues.readTm(doc);
            inv.markDocTm(doc, tm, isinit);
            inv.bits.add(doc);
            if (isReadDouble) {
              inv.setTmValueDouble(tm,RamTermNumValue.EMPTY_FOR_MARK);
            }
          }
        } else {
          for (doc = 0; doc < maxdoc; doc++) {
            tm = docValues.readTm(doc);
            inv.markDocTm(doc, tm, isinit);
            inv.bits.add(doc);
            if (isReadDouble) {
              inv.setTmValueDouble(tm,RamTermNumValue.EMPTY_FOR_MARK);
            }
          }
        }
      } else {
        if (baseAdvanceDocs != null) {
          DocIterator iter = baseAdvanceDocs.iterator();
          while (iter.hasNext()) {
            doc = iter.nextDoc();
            tm = docValues.readTm(doc);
            inv.markDocTm(doc, tm, isinit);
            inv.bits.add(doc);
            if (isReadDouble) {
              inv.setTmValueLong(tm,  (long) RamTermNumValue.EMPTY_FOR_MARK);
            }
          }
        } else {
          for (doc = 0; doc < maxdoc; doc++) {
            tm = docValues.readTm(doc);
            inv.markDocTm(doc, tm, isinit);
            inv.bits.add(doc);
            if (isReadDouble) {
              inv.setTmValueLong(tm,  (long) RamTermNumValue.EMPTY_FOR_MARK);
            }
          }
        }
      }
     
      long l2=System.currentTimeMillis();

 
      if (isReadDouble) {
        if (inv.fieldDataType == FieldDatatype.d_double) {
          BlockArray<Double> list = inv.getTmValueDouble();
          for (int i = 0; i <=docValues.maxtm; i++) {
            if (list.get(i) <= RamTermNumValue.EMPTY_FOR_MARK_FORCMP) {
              double val = Double.longBitsToDouble(docValues.readTmValue(i,true));
              list.set(i, val);
            }
          }
        } else {
          BlockArray<Long> list = inv.getTmValueLong();
          for (int i = 0; i <=docValues.maxtm; i++) {
            if (list.get(i) <= RamTermNumValue.EMPTY_FOR_MARK_FORCMP) {
              long val = docValues.readTmValue(i,false);
              list.set(i, val);
            }
          }
        }
 
View Full Code Here

TOP

Related Classes of org.apache.lucene.index.DocValuesReader

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.