Package org.apache.lucene.search

Examples of org.apache.lucene.search.MultiTermQuery.rewrite()


        flatQueries.add( sourceQuery );
    }
    else if (sourceQuery instanceof MultiTermQuery && reader != null) {
      MultiTermQuery copy = (MultiTermQuery) sourceQuery.clone();
      copy.setRewriteMethod(new MultiTermQuery.TopTermsScoringBooleanQueryRewrite(MAX_MTQ_TERMS));
      BooleanQuery mtqTerms = (BooleanQuery) copy.rewrite(reader);
      flatten(mtqTerms, reader, flatQueries);
    }
    else if( sourceQuery instanceof PhraseQuery ){
      if( !flatQueries.contains( sourceQuery ) ){
        PhraseQuery pq = (PhraseQuery)sourceQuery;
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.