lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From markrmil...@apache.org
Subject svn commit: r801845 - in /lucene/solr/trunk: CHANGES.txt src/java/org/apache/solr/analysis/CapitalizationFilterFactory.java
Date Thu, 06 Aug 2009 23:54:50 GMT
Author: markrmiller
Date: Thu Aug  6 23:54:49 2009
New Revision: 801845

URL: http://svn.apache.org/viewvc?rev=801845&view=rev
Log:
SOLR-1342: CapitalizationFilterFactory uses incorrect term length calculations.

Modified:
    lucene/solr/trunk/CHANGES.txt
    lucene/solr/trunk/src/java/org/apache/solr/analysis/CapitalizationFilterFactory.java

Modified: lucene/solr/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/CHANGES.txt?rev=801845&r1=801844&r2=801845&view=diff
==============================================================================
--- lucene/solr/trunk/CHANGES.txt (original)
+++ lucene/solr/trunk/CHANGES.txt Thu Aug  6 23:54:49 2009
@@ -456,6 +456,10 @@
 54. SOLR-1317: Fix CapitalizationFilterFactory to work when keep parameter is not specified.
     (ehatcher)
 
+55. SOLR-1342: CapitalizationFilterFactory uses incorrect term length calculations.
+    (Robert Muir via Mark Miller)
+
+
 Other Changes
 ----------------------
  1. Upgraded to Lucene 2.4.0 (yonik)

Modified: lucene/solr/trunk/src/java/org/apache/solr/analysis/CapitalizationFilterFactory.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/java/org/apache/solr/analysis/CapitalizationFilterFactory.java?rev=801845&r1=801844&r2=801845&view=diff
==============================================================================
--- lucene/solr/trunk/src/java/org/apache/solr/analysis/CapitalizationFilterFactory.java (original)
+++ lucene/solr/trunk/src/java/org/apache/solr/analysis/CapitalizationFilterFactory.java Thu
Aug  6 23:54:49 2009
@@ -209,7 +209,7 @@
         //make a backup in case we exceed the word count
         System.arraycopy(termBuffer, 0, backup, 0, termBufferLength);
       }
-      if (termBuffer.length < factory.maxTokenLength) {
+      if (termBufferLength < factory.maxTokenLength) {
         int wordCount = 0;
 
         int lastWordStart = 0;
@@ -226,8 +226,8 @@
         }
 
         // process the last word
-        if (lastWordStart < termBuffer.length) {
-          factory.processWord(termBuffer, lastWordStart, termBuffer.length - lastWordStart,
wordCount++);
+        if (lastWordStart < termBufferLength) {
+          factory.processWord(termBuffer, lastWordStart, termBufferLength - lastWordStart,
wordCount++);
         }
 
         if (wordCount > factory.maxWordCount) {



Mime
View raw message