Package org.apache.lucene.index

Examples of org.apache.lucene.index.FilterIndexReader


  }
  ***/

  public IndexReader dummyIndexReader(final int maxDoc) {

    IndexReader r = new FilterIndexReader(null) {
      @Override
      public int maxDoc() {
        return maxDoc;
      }

View Full Code Here


  }
  ***/

  public IndexReader dummyIndexReader(final int maxDoc) {

    IndexReader r = new FilterIndexReader(null) {
      @Override
      public int maxDoc() {
        return maxDoc;
      }

View Full Code Here

      }
    } else if (highlightCnstScrRngQuery && query instanceof ConstantScoreRangeQuery) {
      ConstantScoreRangeQuery q = (ConstantScoreRangeQuery) query;
      Term lower = new Term(fieldName, q.getLowerVal());
      Term upper = new Term(fieldName, q.getUpperVal());
      FilterIndexReader fir = new FilterIndexReader(getReaderForField(fieldName));
      try {
        TermEnum te = fir.terms(lower);
        BooleanQuery bq = new BooleanQuery();
        do {
          Term term = te.term();
          if (term != null && upper.compareTo(term) >= 0) {
            bq.add(new BooleanClause(new TermQuery(term), BooleanClause.Occur.SHOULD));
          } else {
            break;
          }
        } while (te.next());
        extract(bq, terms);
      } finally {
        fir.close();
      }
    }
  }
View Full Code Here

TOP

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

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.