jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r1459799 - /jackrabbit/tags/2.4.1/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/NotQuery.java
Date Fri, 22 Mar 2013 14:29:07 GMT
Author: ard
Date: Fri Mar 22 14:29:06 2013
New Revision: 1459799

URL: http://svn.apache.org/r1459799
Log:
JCR-3539 fix the NotQuery to have a advance and nextDoc working in line with how Lucene contract
is.  In case of a Filter was applied in the search, that now works as well

Modified:
    jackrabbit/tags/2.4.1/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/NotQuery.java

Modified: jackrabbit/tags/2.4.1/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/NotQuery.java
URL: http://svn.apache.org/viewvc/jackrabbit/tags/2.4.1/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/NotQuery.java?rev=1459799&r1=1459798&r2=1459799&view=diff
==============================================================================
--- jackrabbit/tags/2.4.1/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/NotQuery.java
(original)
+++ jackrabbit/tags/2.4.1/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/NotQuery.java
Fri Mar 22 14:29:06 2013
@@ -171,6 +171,8 @@ class NotQuery extends Query {
          */
         private int contextNo = -1;
 
+        private boolean firstTime = true;
+
         /**
          * Creates a new scorer
          * @param reader
@@ -186,7 +188,8 @@ class NotQuery extends Query {
                 return docNo;
             }
 
-            if (docNo == -1) {
+            if (firstTime) {
+                firstTime = false;
                 // get first doc of context scorer
                 int docId = contextScorer.nextDoc();
                 if (docId != NO_MORE_DOCS) {



Mime
View raw message