lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject cvs commit: jakarta-lucene/src/java/org/apache/lucene/search BooleanQuery.java
Date Wed, 10 Oct 2001 17:55:05 GMT
cutting     01/10/10 10:55:04

  Modified:    src/java/org/apache/lucene/search BooleanQuery.java
  Log:
  Removed some redundant code.  This is already in BooleanScorer.
  
  Revision  Changes    Path
  1.2       +0 -10     jakarta-lucene/src/java/org/apache/lucene/search/BooleanQuery.java
  
  Index: BooleanQuery.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/java/org/apache/lucene/search/BooleanQuery.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- BooleanQuery.java	2001/09/18 16:29:56	1.1
  +++ BooleanQuery.java	2001/10/10 17:55:04	1.2
  @@ -127,24 +127,14 @@
   
       BooleanScorer result = new BooleanScorer();
   
  -    int theMask = 1, thisMask;
       for (int i = 0 ; i < clauses.size(); i++) {
         BooleanClause c = (BooleanClause)clauses.elementAt(i);
  -      if (c.required || c.prohibited) {
  -	thisMask = theMask;
  -	theMask = theMask << 1;
  -      } else
  -	thisMask = 0;
  -      
         Scorer subScorer = c.query.scorer(reader);
         if (subScorer != null)
   	result.add(subScorer, c.required, c.prohibited);
         else if (c.required)
   	return null;
       }
  -    if (theMask == 0)
  -      throw new IndexOutOfBoundsException
  -	("More than 32 required/prohibited clauses in query.");
   
       return result;
     }
  
  
  

Mime
View raw message