lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From uschind...@apache.org
Subject svn commit: r935739 - in /lucene/dev/trunk/solr/src: java/org/apache/solr/analysis/ThaiWordFilterFactory.java test/org/apache/solr/analysis/TestThaiWordFilterFactory.java
Date Mon, 19 Apr 2010 20:56:35 GMT
Author: uschindler
Date: Mon Apr 19 20:56:35 2010
New Revision: 935739

URL: http://svn.apache.org/viewvc?rev=935739&view=rev
Log:
LUCENE-2404: Add Solr part (luceneMatchVersion init param)

Modified:
    lucene/dev/trunk/solr/src/java/org/apache/solr/analysis/ThaiWordFilterFactory.java
    lucene/dev/trunk/solr/src/test/org/apache/solr/analysis/TestThaiWordFilterFactory.java

Modified: lucene/dev/trunk/solr/src/java/org/apache/solr/analysis/ThaiWordFilterFactory.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/src/java/org/apache/solr/analysis/ThaiWordFilterFactory.java?rev=935739&r1=935738&r2=935739&view=diff
==============================================================================
--- lucene/dev/trunk/solr/src/java/org/apache/solr/analysis/ThaiWordFilterFactory.java (original)
+++ lucene/dev/trunk/solr/src/java/org/apache/solr/analysis/ThaiWordFilterFactory.java Mon
Apr 19 20:56:35 2010
@@ -25,7 +25,8 @@ import org.apache.lucene.analysis.TokenS
 /** Factory for {@link ThaiWordFilter} */
 public class ThaiWordFilterFactory extends BaseTokenFilterFactory {
   public ThaiWordFilter create(TokenStream input) {
-    return new ThaiWordFilter(input);
+    assureMatchVersion();
+    return new ThaiWordFilter(luceneMatchVersion, input);
   }
 }
 

Modified: lucene/dev/trunk/solr/src/test/org/apache/solr/analysis/TestThaiWordFilterFactory.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/src/test/org/apache/solr/analysis/TestThaiWordFilterFactory.java?rev=935739&r1=935738&r2=935739&view=diff
==============================================================================
--- lucene/dev/trunk/solr/src/test/org/apache/solr/analysis/TestThaiWordFilterFactory.java
(original)
+++ lucene/dev/trunk/solr/src/test/org/apache/solr/analysis/TestThaiWordFilterFactory.java
Mon Apr 19 20:56:35 2010
@@ -35,6 +35,7 @@ public class TestThaiWordFilterFactory e
     Reader reader = new StringReader("การที่ได้ต้องแสดงว่างานดี");
     Tokenizer tokenizer = new WhitespaceTokenizer(DEFAULT_VERSION, reader);
     ThaiWordFilterFactory factory = new ThaiWordFilterFactory();
+    factory.init(DEFAULT_VERSION_PARAM);
     TokenStream stream = factory.create(tokenizer);
     assertTokenStreamContents(stream, new String[] {"การ", "ที่",
"ได้",
         "ต้อง", "แสดง", "ว่า", "งาน",
"ดี"});



Mime
View raw message