lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From busc...@apache.org
Subject svn commit: r607832 - in /lucene/java/trunk: CHANGES.txt contrib/miscellaneous/src/java/org/apache/lucene/queryParser/analyzing/AnalyzingQueryParser.java
Date Tue, 01 Jan 2008 12:49:45 GMT
Author: buschmi
Date: Tue Jan  1 04:49:44 2008
New Revision: 607832

URL: http://svn.apache.org/viewvc?rev=607832&view=rev
Log:
LUCENE-746: Fix error message in AnalyzingQueryParser.getPrefixQuery.

Modified:
    lucene/java/trunk/CHANGES.txt
    lucene/java/trunk/contrib/miscellaneous/src/java/org/apache/lucene/queryParser/analyzing/AnalyzingQueryParser.java

Modified: lucene/java/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/java/trunk/CHANGES.txt?rev=607832&r1=607831&r2=607832&view=diff
==============================================================================
--- lucene/java/trunk/CHANGES.txt (original)
+++ lucene/java/trunk/CHANGES.txt Tue Jan  1 04:49:44 2008
@@ -344,6 +344,9 @@
     classes, as well as an unified view. Also add an appropriate menu 
     structure to the website. (Michael Busch)
 
+ 2. LUCENE-746: Fix error message in AnalyzingQueryParser.getPrefixQuery.
+    (Ronnie Kolehmainen via Michael Busch)
+
 Build
 
  1. LUCENE-908: Improvements and simplifications for how the MANIFEST

Modified: lucene/java/trunk/contrib/miscellaneous/src/java/org/apache/lucene/queryParser/analyzing/AnalyzingQueryParser.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/miscellaneous/src/java/org/apache/lucene/queryParser/analyzing/AnalyzingQueryParser.java?rev=607832&r1=607831&r2=607832&view=diff
==============================================================================
--- lucene/java/trunk/contrib/miscellaneous/src/java/org/apache/lucene/queryParser/analyzing/AnalyzingQueryParser.java
(original)
+++ lucene/java/trunk/contrib/miscellaneous/src/java/org/apache/lucene/queryParser/analyzing/AnalyzingQueryParser.java
Tue Jan  1 04:49:44 2008
@@ -212,10 +212,11 @@
     if (tlist.size() == 1) {
       return super.getPrefixQuery(field, (String) tlist.get(0));
     } else {
-      /* this means that the analyzer used consumed the only token we had,
-       * and we can't build a PrefixQuery */
+      /* this means that the analyzer used either added or consumed
+       * (common for a stemmer) tokens, and we can't build a PrefixQuery */
       throw new ParseException("Cannot build PrefixQuery with analyzer "
-          + getAnalyzer().getClass() + " - token was consumed");
+          + getAnalyzer().getClass()
+          + (tlist.size() > 1 ? " - token(s) added" : " - token consumed"));
     }
   }
 



Mime
View raw message