jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexparvule...@apache.org
Subject svn commit: r1296202 - in /jackrabbit/trunk/jackrabbit-core/src: main/java/org/apache/jackrabbit/core/query/lucene/LuceneQueryFactory.java test/java/org/apache/jackrabbit/core/query/SQL2TooManyClausesTest.java
Date Fri, 02 Mar 2012 13:44:15 GMT
Author: alexparvulescu
Date: Fri Mar  2 13:44:15 2012
New Revision: 1296202

URL: http://svn.apache.org/viewvc?rev=1296202&view=rev
Log:
JCR-3247 SQL2 ISDESCENDANTNODE BooleanQuery#TooManyClauses returns

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/LuceneQueryFactory.java
    jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/SQL2TooManyClausesTest.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/LuceneQueryFactory.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/LuceneQueryFactory.java?rev=1296202&r1=1296201&r2=1296202&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/LuceneQueryFactory.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/LuceneQueryFactory.java
Fri Mar  2 13:44:15 2012
@@ -459,7 +459,6 @@ public class LuceneQueryFactory {
             ids.add(ancestor.getIdentifier());
             while (!ids.isEmpty()) {
                 String id = ids.removeFirst();
-                clauses++;
                 Query q = new JackrabbitTermQuery(new Term(FieldNames.PARENT, id));
                 QueryHits hits = searcher.evaluate(q);
                 ScoreNode sn = hits.nextScoreNode();
@@ -467,10 +466,12 @@ public class LuceneQueryFactory {
                     // reset query so it does not overflow because of the max
                     // clause count condition,
                     // see JCR-3108
+                    clauses++;
                     if (clauses == BooleanQuery.getMaxClauseCount()) {
                         BooleanQuery wrapQ = new BooleanQuery();
                         wrapQ.add(query, SHOULD);
                         query = wrapQ;
+                        clauses = 1;
                     }
                     query.add(q, SHOULD);
                     do {

Modified: jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/SQL2TooManyClausesTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/SQL2TooManyClausesTest.java?rev=1296202&r1=1296201&r2=1296202&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/SQL2TooManyClausesTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/SQL2TooManyClausesTest.java
Fri Mar  2 13:44:15 2012
@@ -35,7 +35,7 @@ public class SQL2TooManyClausesTest exte
 
     private Node girls;
 
-    private final int nodes = 1100;
+    private final int nodes = 3300;
 
     @Override
     protected void setUp() throws Exception {



Mime
View raw message