lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yo...@apache.org
Subject svn commit: r520891 - in /lucene/java/trunk/src/java/org/apache/lucene/search: PrefixFilter.java PrefixQuery.java RangeQuery.java
Date Wed, 21 Mar 2007 13:58:48 GMT
Author: yonik
Date: Wed Mar 21 06:58:47 2007
New Revision: 520891

URL: http://svn.apache.org/viewvc?view=rev&rev=520891
Log:
interned comparison comments

Modified:
    lucene/java/trunk/src/java/org/apache/lucene/search/PrefixFilter.java
    lucene/java/trunk/src/java/org/apache/lucene/search/PrefixQuery.java
    lucene/java/trunk/src/java/org/apache/lucene/search/RangeQuery.java

Modified: lucene/java/trunk/src/java/org/apache/lucene/search/PrefixFilter.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/search/PrefixFilter.java?view=diff&rev=520891&r1=520890&r2=520891
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/search/PrefixFilter.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/search/PrefixFilter.java Wed Mar 21 06:58:47
2007
@@ -70,7 +70,7 @@
         Term term = enumerator.term();
         if (term != null &&
             term.text().startsWith(prefixText) &&
-            term.field() == prefixField)
+            term.field() == prefixField) // interned comparison
         {
           termDocs.seek(term);
           while (termDocs.next()) {

Modified: lucene/java/trunk/src/java/org/apache/lucene/search/PrefixQuery.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/search/PrefixQuery.java?view=diff&rev=520891&r1=520890&r2=520891
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/search/PrefixQuery.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/search/PrefixQuery.java Wed Mar 21 06:58:47
2007
@@ -47,7 +47,8 @@
         Term term = enumerator.term();
         if (term != null &&
             term.text().startsWith(prefixText) &&
-            term.field() == prefixField) {
+            term.field() == prefixField) // interned comparison 
+        {
           TermQuery tq = new TermQuery(term);	  // found a match
           tq.setBoost(getBoost());                // set the boost
           query.add(tq, BooleanClause.Occur.SHOULD);		  // add to query

Modified: lucene/java/trunk/src/java/org/apache/lucene/search/RangeQuery.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/search/RangeQuery.java?view=diff&rev=520891&r1=520890&r2=520891
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/search/RangeQuery.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/search/RangeQuery.java Wed Mar 21 06:58:47
2007
@@ -91,7 +91,7 @@
 
             do {
                 Term term = enumerator.term();
-                if (term != null && term.field() == testField) {
+                if (term != null && term.field() == testField) { // interned comparison
                     if (!checkLower || term.text().compareTo(lowerTerm.text()) > 0) {
                         checkLower = false;
                         if (upperTerm != null) {



Mime
View raw message