Examples of numDeletedDocs()


Examples of org.apache.lucene.index.IndexReader.numDeletedDocs()

    assertEquals(air.isCurrent(), tir.isCurrent());
    assertEquals(air.hasDeletions(), tir.hasDeletions());
    assertEquals(air.maxDoc(), tir.maxDoc());
    assertEquals(air.numDocs(), tir.numDocs());
    assertEquals(air.numDeletedDocs(), tir.numDeletedDocs());

    air.deleteDocument(8);
    tir.deleteDocument(8);

    assertEquals(air.isCurrent(), tir.isCurrent());
View Full Code Here

Examples of org.apache.lucene.index.IndexReader.numDeletedDocs()

    assertEquals(air.isCurrent(), tir.isCurrent());
    assertEquals(air.hasDeletions(), tir.hasDeletions());
    assertEquals(air.maxDoc(), tir.maxDoc());
    assertEquals(air.numDocs(), tir.numDocs());
    assertEquals(air.numDeletedDocs(), tir.numDeletedDocs());   

    // this (in 3.0) commits the deletions
    air.close();
    tir.close();
View Full Code Here

Examples of org.apache.lucene.index.IndexReader.numDeletedDocs()

    assertEquals(air.isCurrent(), tir.isCurrent());
    assertEquals(air.hasDeletions(), tir.hasDeletions());
    assertEquals(air.maxDoc(), tir.maxDoc());
    assertEquals(air.numDocs(), tir.numDocs());
    assertEquals(air.numDeletedDocs(), tir.numDeletedDocs());

    for (int d =0; d<air.maxDoc(); d++) {
      assertEquals(air.isDeleted(d), tir.isDeleted(d));
    }
View Full Code Here

Examples of org.apache.lucene.index.IndexReader.numDeletedDocs()

      Assert.assertEquals("writer has non-deleted docs",
                          0, w.numDocs());
      w.close();
      IndexReader r = IndexReader.open(d, true);
      Assert.assertEquals("reader has wrong number of deleted docs",
                          numDeletedDocs, r.numDeletedDocs());
      r.close();
      return d;
  }
 
View Full Code Here

Examples of org.apache.lucene.index.IndexReader.numDeletedDocs()

      r = IndexReader.open(dir, true);
    else
      r = IndexReader.open(OpenReaderTask.findIndexCommit(dir, userData),
                           null,
                           true);
    System.out.println("--> numDocs:"+r.numDocs()+" dels:"+r.numDeletedDocs());
    r.close();
    return 1;
  }
}
View Full Code Here

Examples of org.apache.lucene.index.IndexReader.numDeletedDocs()

      Assert.assertEquals("writer has non-deleted docs",
                          0, w.numDocs());
      w.close();
      IndexReader r = IndexReader.open(d, true);
      Assert.assertEquals("reader has wrong number of deleted docs",
                          numDeletedDocs, r.numDeletedDocs());
      r.close();
      return d;
  }
 
View Full Code Here

Examples of org.apache.lucene.index.IndexReader.numDeletedDocs()

                response.put("indexVersion", skywalker.getVersion());
                response.put("directoryImpl", skywalker.getDirImpl());
                response.put("numDocs", reader.numDocs());
                response.put("maxDoc", reader.maxDoc());
                response.put("hasDeletions", reader.hasDeletions());
                response.put("numDeletedDocs", reader.numDeletedDocs());

                Set<FieldTermCount> ftc = skywalker.getFieldTermCounts();
                response.put("numTerms", skywalker.getNumTerms());

                Map indexFormatInfo = new HashMap();
View Full Code Here

Examples of org.apache.lucene.index.IndexWriter.numDeletedDocs()

                        segment = new Segment(info.name);
                        segment.search = false;
                        segment.committed = true;
                        segment.docCount = info.docCount;
                        try {
                            segment.delDocCount = indexWriter.numDeletedDocs(info);
                        } catch (IOException e) {
                            logger.trace("failed to get deleted docs for committed segment", e);
                        }
                        try {
                            segment.sizeInBytes = info.sizeInBytes(true);
View Full Code Here

Examples of org.apache.lucene.index.SegmentReader.numDeletedDocs()

  else if (in instanceof SegmentReader){
     // should use SegmentReader.reopen
    // TODO: see LUCENE-2559
   
    SegmentReader sreader = (SegmentReader)in;
    int numDels = sreader.numDeletedDocs();
   
    SegmentInfo sinfo = null;
    boolean sameSeg = false;
    //get SegmentInfo instance
    for (int i=0;i<size;++i){
View Full Code Here

Examples of org.apache.lucene.index.SegmentReader.numDeletedDocs()

  else if (in instanceof SegmentReader){
     // should use SegmentReader.reopen
    // TODO: see LUCENE-2559
   
    SegmentReader sreader = (SegmentReader)in;
    int numDels = sreader.numDeletedDocs();
   
    SegmentInfo sinfo = null;
    boolean sameSeg = false;
    //get SegmentInfo instance
    for (int i=0;i<size;++i){
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.