Examples of termDocs()


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

  }

  private void verifyTermDocs(Directory dir, Term term, int numDocs)
      throws IOException {
    IndexReader reader = IndexReader.open(dir);
    TermDocs termDocs = reader.termDocs(term);
    int count = 0;
    while (termDocs.next())
      count++;
    assertEquals(numDocs, count);
    reader.close();
View Full Code Here

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

            throws IOException {
        IndexReader reader = index.getIndexReader();
        try {
            checkRewritten(reader);
            Term idTerm = new Term(FieldNames.UUID, id.toString());
            TermDocs tDocs = reader.termDocs(idTerm);
            int docNumber;
            Document doc;
            try {
                if (tDocs.next()) {
                    docNumber = tDocs.doc();
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.