Package org.apache.lucene.index

Examples of org.apache.lucene.index.FilterIndexReader.terms()


      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));
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.