Package org.apache.solr.search

Examples of org.apache.solr.search.SolrIndexReader.numDocs()


    assertU(adoc("id","4"));
    assertU(commit());

    SolrQueryRequest sr = req("q","foo");
    SolrIndexReader r = sr.getSearcher().getReader();
    assertTrue(r.maxDoc() > r.numDocs());   // should have deletions
    assertTrue(r.getLeafReaders().length > 1)// more than 1 segment
    sr.close();

    assertU(commit("expungeDeletes","true"));
View Full Code Here


    assertU(commit("expungeDeletes","true"));

    sr = req("q","foo");
    r = sr.getSearcher().getReader();
    assertEquals(r.maxDoc(), r.numDocs())// no deletions
    assertEquals(4,r.maxDoc());             // no dups
    assertTrue(r.getLeafReaders().length > 1)// still more than 1 segment
    sr.close();
  }
 
View Full Code Here

    assertU(adoc("id","4"));
    assertU(commit());

    SolrQueryRequest sr = req("q","foo");
    SolrIndexReader r = sr.getSearcher().getReader();
    assertTrue(r.maxDoc() > r.numDocs());   // should have deletions
    assertTrue(r.getLeafReaders().length > 1)// more than 1 segment
    sr.close();

    assertU(commit("expungeDeletes","true"));
View Full Code Here

    assertU(commit("expungeDeletes","true"));

    sr = req("q","foo");
    r = sr.getSearcher().getReader();
    assertEquals(r.maxDoc(), r.numDocs())// no deletions
    assertEquals(4,r.maxDoc());             // no dups
    assertTrue(r.getLeafReaders().length > 1)// still more than 1 segment
    sr.close();
  }
 
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.