Package org.apache.lucene.search

Examples of org.apache.lucene.search.Filter.bits()


  public BitSet bits(IndexReader reader) throws IOException {
    if (chainedFilters.size() == 0) throw new AssertionFailure("Chainedfilter has no filters to chain for");
    //we need to copy the first BitSet because BitSet is modified by .logicalOp
    Filter filter = chainedFilters.get( 0 );
    BitSet result = (BitSet) filter.bits( reader ).clone();
    for (int index = 1 ; index < chainedFilters.size() ; index++) {
      result.and( chainedFilters.get( index ).bits( reader ) );
    }
    return result;
  }
View Full Code Here


  public BitSet bits(IndexReader reader) throws IOException {
    if (chainedFilters.size() == 0) throw new AssertionFailure("Chainedfilter has no filters to chain for");
    //we need to copy the first BitSet because BitSet is modified by .logicalOp
    Filter filter = chainedFilters.get( 0 );
    BitSet result = (BitSet) filter.bits( reader ).clone();
    for (int index = 1 ; index < chainedFilters.size() ; index++) {
      result.and( chainedFilters.get( index ).bits( reader ) );
    }
    return result;
  }
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.