jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r565316 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/MatchAllScorer.java
Date Mon, 13 Aug 2007 11:49:30 GMT
Author: mreutegg
Date: Mon Aug 13 04:49:29 2007
New Revision: 565316

URL: http://svn.apache.org/viewvc?view=rev&rev=565316
Log:
JCR-1051: MatchAllScorer calculateDocFilter() bug

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/MatchAllScorer.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/MatchAllScorer.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/MatchAllScorer.java?view=diff&rev=565316&r1=565315&r2=565316
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/MatchAllScorer.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/MatchAllScorer.java
Mon Aug 13 04:49:29 2007
@@ -153,13 +153,14 @@
         // otherwise calculate new
         docFilter = new BitSet(reader.maxDoc());
         // we match all terms
-        TermEnum terms = reader.terms(new Term(FieldNames.PROPERTIES, FieldNames.createNamedValue(field,
"")));
+        String namedValue = FieldNames.createNamedValue(field, "");
+        TermEnum terms = reader.terms(new Term(FieldNames.PROPERTIES, namedValue));
         try {
             TermDocs docs = reader.termDocs();
             try {
                 while (terms.term() != null
                         && terms.term().field() == FieldNames.PROPERTIES
-                        && terms.term().text().startsWith(FieldNames.createNamedValue(field,
""))) {
+                        && terms.term().text().startsWith(namedValue)) {
                     docs.seek(terms);
                     while (docs.next()) {
                         docFilter.set(docs.doc());



Mime
View raw message