lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sha...@apache.org
Subject svn commit: r891596 - in /lucene/solr/trunk: CHANGES.txt src/java/org/apache/solr/analysis/CapitalizationFilterFactory.java
Date Thu, 17 Dec 2009 09:19:07 GMT
Author: shalin
Date: Thu Dec 17 09:19:06 2009
New Revision: 891596

URL: http://svn.apache.org/viewvc?rev=891596&view=rev
Log:
SOLR-1660 -- CapitalizationFilter crashes if you use the maxWordCountOption

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=891596&r1=891595&r2=891596&view=diff
==============================================================================
--- lucene/solr/trunk/CHANGES.txt (original)
+++ lucene/solr/trunk/CHANGES.txt Thu Dec 17 09:19:06 2009
@@ -142,6 +142,9 @@
 * SOLR-1651: Fixed Incorrect dataimport handler package name in SolrResourceLoader
   (Akshay Ukey via shalin)
 
+* SOLR-1660: CapitalizationFilter crashes if you use the maxWordCountOption
+  (Robert Muir via shalin)
+
 Other Changes
 ----------------------
 

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=891596&r1=891595&r2=891596&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
Dec 17 09:19:06 2009
@@ -206,6 +206,7 @@
     char[] backup = null;
     if (factory.maxWordCount < CapitalizationFilterFactory.DEFAULT_MAX_WORD_COUNT) {
       //make a backup in case we exceed the word count
+      backup = new char[termBufferLength];
       System.arraycopy(termBuffer, 0, backup, 0, termBufferLength);
     }
     if (termBufferLength < factory.maxTokenLength) {



Mime
View raw message