lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From uschind...@apache.org
Subject svn commit: r923670 - in /lucene/solr/branches/solr/src: java/org/apache/solr/analysis/ test/org/apache/solr/analysis/
Date Tue, 16 Mar 2010 10:36:22 GMT
Author: uschindler
Date: Tue Mar 16 10:36:22 2010
New Revision: 923670

URL: http://svn.apache.org/viewvc?rev=923670&view=rev
Log:
SOLR-1677: More factories converted to use matchVersion

Modified:
    lucene/solr/branches/solr/src/java/org/apache/solr/analysis/ArabicLetterTokenizerFactory.java
    lucene/solr/branches/solr/src/java/org/apache/solr/analysis/ElisionFilterFactory.java
    lucene/solr/branches/solr/src/java/org/apache/solr/analysis/LetterTokenizerFactory.java
    lucene/solr/branches/solr/src/java/org/apache/solr/analysis/LowerCaseFilterFactory.java
    lucene/solr/branches/solr/src/java/org/apache/solr/analysis/LowerCaseTokenizerFactory.java
    lucene/solr/branches/solr/src/java/org/apache/solr/analysis/ReverseStringFilterFactory.java
    lucene/solr/branches/solr/src/java/org/apache/solr/analysis/RussianLetterTokenizerFactory.java
    lucene/solr/branches/solr/src/java/org/apache/solr/analysis/StopFilterFactory.java
    lucene/solr/branches/solr/src/java/org/apache/solr/analysis/WhitespaceTokenizerFactory.java
    lucene/solr/branches/solr/src/test/org/apache/solr/analysis/TestArabicFilters.java
    lucene/solr/branches/solr/src/test/org/apache/solr/analysis/TestElisionFilterFactory.java
    lucene/solr/branches/solr/src/test/org/apache/solr/analysis/TestReverseStringFilterFactory.java
    lucene/solr/branches/solr/src/test/org/apache/solr/analysis/TestRussianFilters.java

Modified: lucene/solr/branches/solr/src/java/org/apache/solr/analysis/ArabicLetterTokenizerFactory.java
URL: http://svn.apache.org/viewvc/lucene/solr/branches/solr/src/java/org/apache/solr/analysis/ArabicLetterTokenizerFactory.java?rev=923670&r1=923669&r2=923670&view=diff
==============================================================================
--- lucene/solr/branches/solr/src/java/org/apache/solr/analysis/ArabicLetterTokenizerFactory.java
(original)
+++ lucene/solr/branches/solr/src/java/org/apache/solr/analysis/ArabicLetterTokenizerFactory.java
Tue Mar 16 10:36:22 2010
@@ -29,6 +29,7 @@ import java.io.Reader;
 public class ArabicLetterTokenizerFactory extends BaseTokenizerFactory{
 
   public ArabicLetterTokenizer create(Reader input) {
-    return new ArabicLetterTokenizer(input);
+    assureMatchVersion();
+    return new ArabicLetterTokenizer(luceneMatchVersion, input);
   }
 }

Modified: lucene/solr/branches/solr/src/java/org/apache/solr/analysis/ElisionFilterFactory.java
URL: http://svn.apache.org/viewvc/lucene/solr/branches/solr/src/java/org/apache/solr/analysis/ElisionFilterFactory.java?rev=923670&r1=923669&r2=923670&view=diff
==============================================================================
--- lucene/solr/branches/solr/src/java/org/apache/solr/analysis/ElisionFilterFactory.java
(original)
+++ lucene/solr/branches/solr/src/java/org/apache/solr/analysis/ElisionFilterFactory.java
Tue Mar 16 10:36:22 2010
@@ -56,7 +56,8 @@ public class ElisionFilterFactory extend
   }
 
   public ElisionFilter create(TokenStream input) {
-    return new ElisionFilter(input,articles);
+    assureMatchVersion();
+    return new ElisionFilter(luceneMatchVersion,input,articles);
   }
 }
 

Modified: lucene/solr/branches/solr/src/java/org/apache/solr/analysis/LetterTokenizerFactory.java
URL: http://svn.apache.org/viewvc/lucene/solr/branches/solr/src/java/org/apache/solr/analysis/LetterTokenizerFactory.java?rev=923670&r1=923669&r2=923670&view=diff
==============================================================================
--- lucene/solr/branches/solr/src/java/org/apache/solr/analysis/LetterTokenizerFactory.java
(original)
+++ lucene/solr/branches/solr/src/java/org/apache/solr/analysis/LetterTokenizerFactory.java
Tue Mar 16 10:36:22 2010
@@ -27,6 +27,7 @@ import java.io.Reader;
  */
 public class LetterTokenizerFactory extends BaseTokenizerFactory {
   public LetterTokenizer create(Reader input) {
-    return new LetterTokenizer(input);
+    assureMatchVersion();
+    return new LetterTokenizer(luceneMatchVersion, input);
   }
 }

Modified: lucene/solr/branches/solr/src/java/org/apache/solr/analysis/LowerCaseFilterFactory.java
URL: http://svn.apache.org/viewvc/lucene/solr/branches/solr/src/java/org/apache/solr/analysis/LowerCaseFilterFactory.java?rev=923670&r1=923669&r2=923670&view=diff
==============================================================================
--- lucene/solr/branches/solr/src/java/org/apache/solr/analysis/LowerCaseFilterFactory.java
(original)
+++ lucene/solr/branches/solr/src/java/org/apache/solr/analysis/LowerCaseFilterFactory.java
Tue Mar 16 10:36:22 2010
@@ -25,6 +25,7 @@ import org.apache.lucene.analysis.LowerC
  */
 public class LowerCaseFilterFactory extends BaseTokenFilterFactory {
   public LowerCaseFilter create(TokenStream input) {
-    return new LowerCaseFilter(input);
+    assureMatchVersion();
+    return new LowerCaseFilter(luceneMatchVersion,input);
   }
 }

Modified: lucene/solr/branches/solr/src/java/org/apache/solr/analysis/LowerCaseTokenizerFactory.java
URL: http://svn.apache.org/viewvc/lucene/solr/branches/solr/src/java/org/apache/solr/analysis/LowerCaseTokenizerFactory.java?rev=923670&r1=923669&r2=923670&view=diff
==============================================================================
--- lucene/solr/branches/solr/src/java/org/apache/solr/analysis/LowerCaseTokenizerFactory.java
(original)
+++ lucene/solr/branches/solr/src/java/org/apache/solr/analysis/LowerCaseTokenizerFactory.java
Tue Mar 16 10:36:22 2010
@@ -27,6 +27,7 @@ import java.io.Reader;
  */
 public class LowerCaseTokenizerFactory extends BaseTokenizerFactory {
   public LowerCaseTokenizer create(Reader input) {
-    return new LowerCaseTokenizer(input);
+    assureMatchVersion();
+    return new LowerCaseTokenizer(luceneMatchVersion,input);
   }
 }

Modified: lucene/solr/branches/solr/src/java/org/apache/solr/analysis/ReverseStringFilterFactory.java
URL: http://svn.apache.org/viewvc/lucene/solr/branches/solr/src/java/org/apache/solr/analysis/ReverseStringFilterFactory.java?rev=923670&r1=923669&r2=923670&view=diff
==============================================================================
--- lucene/solr/branches/solr/src/java/org/apache/solr/analysis/ReverseStringFilterFactory.java
(original)
+++ lucene/solr/branches/solr/src/java/org/apache/solr/analysis/ReverseStringFilterFactory.java
Tue Mar 16 10:36:22 2010
@@ -28,7 +28,8 @@ import org.apache.lucene.analysis.revers
  */
 public class ReverseStringFilterFactory extends BaseTokenFilterFactory {
   public ReverseStringFilter create(TokenStream in) {
-    return new ReverseStringFilter(in);
+    assureMatchVersion();
+    return new ReverseStringFilter(luceneMatchVersion,in);
   }
 }
 

Modified: lucene/solr/branches/solr/src/java/org/apache/solr/analysis/RussianLetterTokenizerFactory.java
URL: http://svn.apache.org/viewvc/lucene/solr/branches/solr/src/java/org/apache/solr/analysis/RussianLetterTokenizerFactory.java?rev=923670&r1=923669&r2=923670&view=diff
==============================================================================
--- lucene/solr/branches/solr/src/java/org/apache/solr/analysis/RussianLetterTokenizerFactory.java
(original)
+++ lucene/solr/branches/solr/src/java/org/apache/solr/analysis/RussianLetterTokenizerFactory.java
Tue Mar 16 10:36:22 2010
@@ -36,7 +36,8 @@ public class RussianLetterTokenizerFacto
   }
 
   public RussianLetterTokenizer create(Reader in) {
-    return new RussianLetterTokenizer(in);
+    assureMatchVersion();
+    return new RussianLetterTokenizer(luceneMatchVersion,in);
   }
 }
 

Modified: lucene/solr/branches/solr/src/java/org/apache/solr/analysis/StopFilterFactory.java
URL: http://svn.apache.org/viewvc/lucene/solr/branches/solr/src/java/org/apache/solr/analysis/StopFilterFactory.java?rev=923670&r1=923669&r2=923670&view=diff
==============================================================================
--- lucene/solr/branches/solr/src/java/org/apache/solr/analysis/StopFilterFactory.java (original)
+++ lucene/solr/branches/solr/src/java/org/apache/solr/analysis/StopFilterFactory.java Tue
Mar 16 10:36:22 2010
@@ -78,7 +78,9 @@ public class StopFilterFactory extends B
   }
 
   public StopFilter create(TokenStream input) {
-    StopFilter stopFilter = new StopFilter(enablePositionIncrements,input,stopWords,ignoreCase);
+    assureMatchVersion();
+    StopFilter stopFilter = new StopFilter(luceneMatchVersion,input,stopWords,ignoreCase);
+    stopFilter.setEnablePositionIncrements(enablePositionIncrements);
     return stopFilter;
   }
 }

Modified: lucene/solr/branches/solr/src/java/org/apache/solr/analysis/WhitespaceTokenizerFactory.java
URL: http://svn.apache.org/viewvc/lucene/solr/branches/solr/src/java/org/apache/solr/analysis/WhitespaceTokenizerFactory.java?rev=923670&r1=923669&r2=923670&view=diff
==============================================================================
--- lucene/solr/branches/solr/src/java/org/apache/solr/analysis/WhitespaceTokenizerFactory.java
(original)
+++ lucene/solr/branches/solr/src/java/org/apache/solr/analysis/WhitespaceTokenizerFactory.java
Tue Mar 16 10:36:22 2010
@@ -27,6 +27,7 @@ import java.io.Reader;
  */
 public class WhitespaceTokenizerFactory extends BaseTokenizerFactory {
   public WhitespaceTokenizer create(Reader input) {
-    return new WhitespaceTokenizer(input);
+    assureMatchVersion();
+    return new WhitespaceTokenizer(luceneMatchVersion,input);
   }
 }

Modified: lucene/solr/branches/solr/src/test/org/apache/solr/analysis/TestArabicFilters.java
URL: http://svn.apache.org/viewvc/lucene/solr/branches/solr/src/test/org/apache/solr/analysis/TestArabicFilters.java?rev=923670&r1=923669&r2=923670&view=diff
==============================================================================
--- lucene/solr/branches/solr/src/test/org/apache/solr/analysis/TestArabicFilters.java (original)
+++ lucene/solr/branches/solr/src/test/org/apache/solr/analysis/TestArabicFilters.java Tue
Mar 16 10:36:22 2010
@@ -33,6 +33,7 @@ public class TestArabicFilters extends B
   public void testTokenizer() throws Exception {
     Reader reader = new StringReader("الذين مَلكت أيمانكم");
     ArabicLetterTokenizerFactory factory = new ArabicLetterTokenizerFactory();
+    factory.init(DEFAULT_VERSION_PARAM);
     Tokenizer stream = factory.create(reader);
     assertTokenStreamContents(stream, new String[] {"الذين", "مَلكت",
"أيمانكم"});
   }
@@ -44,6 +45,8 @@ public class TestArabicFilters extends B
     Reader reader = new StringReader("الذين مَلكت أيمانكم");
     ArabicLetterTokenizerFactory factory = new ArabicLetterTokenizerFactory();
     ArabicNormalizationFilterFactory filterFactory = new ArabicNormalizationFilterFactory();
+    factory.init(DEFAULT_VERSION_PARAM);
+    filterFactory.init(DEFAULT_VERSION_PARAM);
     Tokenizer tokenizer = factory.create(reader);
     TokenStream stream = filterFactory.create(tokenizer);
     assertTokenStreamContents(stream, new String[] {"الذين", "ملكت",
"ايمانكم"});
@@ -57,6 +60,8 @@ public class TestArabicFilters extends B
     ArabicLetterTokenizerFactory factory = new ArabicLetterTokenizerFactory();
     ArabicNormalizationFilterFactory normFactory = new ArabicNormalizationFilterFactory();
     ArabicStemFilterFactory stemFactory = new ArabicStemFilterFactory();
+    factory.init(DEFAULT_VERSION_PARAM);
+    normFactory.init(DEFAULT_VERSION_PARAM);
     Tokenizer tokenizer = factory.create(reader);
     TokenStream stream = normFactory.create(tokenizer);
     stream = stemFactory.create(stream);

Modified: lucene/solr/branches/solr/src/test/org/apache/solr/analysis/TestElisionFilterFactory.java
URL: http://svn.apache.org/viewvc/lucene/solr/branches/solr/src/test/org/apache/solr/analysis/TestElisionFilterFactory.java?rev=923670&r1=923669&r2=923670&view=diff
==============================================================================
--- lucene/solr/branches/solr/src/test/org/apache/solr/analysis/TestElisionFilterFactory.java
(original)
+++ lucene/solr/branches/solr/src/test/org/apache/solr/analysis/TestElisionFilterFactory.java
Tue Mar 16 10:36:22 2010
@@ -39,6 +39,7 @@ public class TestElisionFilterFactory ex
     Reader reader = new StringReader("l'avion");
     Tokenizer tokenizer = new WhitespaceTokenizer(reader);
     ElisionFilterFactory factory = new ElisionFilterFactory();
+    factory.init(DEFAULT_VERSION_PARAM);
     ResourceLoader loader = new SolrResourceLoader(null, null);
     Map<String,String> args = new HashMap<String,String>();
     args.put("articles", "frenchArticles.txt");

Modified: lucene/solr/branches/solr/src/test/org/apache/solr/analysis/TestReverseStringFilterFactory.java
URL: http://svn.apache.org/viewvc/lucene/solr/branches/solr/src/test/org/apache/solr/analysis/TestReverseStringFilterFactory.java?rev=923670&r1=923669&r2=923670&view=diff
==============================================================================
--- lucene/solr/branches/solr/src/test/org/apache/solr/analysis/TestReverseStringFilterFactory.java
(original)
+++ lucene/solr/branches/solr/src/test/org/apache/solr/analysis/TestReverseStringFilterFactory.java
Tue Mar 16 10:36:22 2010
@@ -35,6 +35,7 @@ public class TestReverseStringFilterFact
     Reader reader = new StringReader("simple test");
     Tokenizer tokenizer = new WhitespaceTokenizer(reader);
     ReverseStringFilterFactory factory = new ReverseStringFilterFactory();
+    factory.init(DEFAULT_VERSION_PARAM);
     TokenStream stream = factory.create(tokenizer);
     assertTokenStreamContents(stream, new String[] { "elpmis", "tset" });
   }

Modified: lucene/solr/branches/solr/src/test/org/apache/solr/analysis/TestRussianFilters.java
URL: http://svn.apache.org/viewvc/lucene/solr/branches/solr/src/test/org/apache/solr/analysis/TestRussianFilters.java?rev=923670&r1=923669&r2=923670&view=diff
==============================================================================
--- lucene/solr/branches/solr/src/test/org/apache/solr/analysis/TestRussianFilters.java (original)
+++ lucene/solr/branches/solr/src/test/org/apache/solr/analysis/TestRussianFilters.java Tue
Mar 16 10:36:22 2010
@@ -34,9 +34,8 @@ public class TestRussianFilters extends 
    */
   public void testTokenizer() throws Exception {
     Reader reader = new StringReader("Вместе с тем о силе
электромагнитной 100");
-    Map<String,String> args = new HashMap<String,String>();
     RussianLetterTokenizerFactory factory = new RussianLetterTokenizerFactory();
-    factory.init(args);
+    factory.init(DEFAULT_VERSION_PARAM);
     Tokenizer stream = factory.create(reader);
     assertTokenStreamContents(stream, new String[] {"Вместе", "с", "тем",
"о",
         "силе", "электромагнитной",
"100"});
@@ -47,11 +46,10 @@ public class TestRussianFilters extends 
    */
   public void testLowerCase() throws Exception {
     Reader reader = new StringReader("Вместе с тем о силе
электромагнитной 100");
-    Map<String,String> args = new HashMap<String,String>();
     RussianLetterTokenizerFactory factory = new RussianLetterTokenizerFactory();
-    factory.init(args);
+    factory.init(DEFAULT_VERSION_PARAM);
     RussianLowerCaseFilterFactory filterFactory = new RussianLowerCaseFilterFactory();
-    filterFactory.init(args);
+    filterFactory.init(DEFAULT_VERSION_PARAM);
     Tokenizer tokenizer = factory.create(reader);
     TokenStream stream = filterFactory.create(tokenizer);
     assertTokenStreamContents(stream, new String[] {"вместе", "с", "тем",
"о",
@@ -63,13 +61,12 @@ public class TestRussianFilters extends 
    */
   public void testStemmer() throws Exception {
     Reader reader = new StringReader("Вместе с тем о силе
электромагнитной 100");
-    Map<String,String> args = new HashMap<String,String>();
     RussianLetterTokenizerFactory factory = new RussianLetterTokenizerFactory();
-    factory.init(args);
+    factory.init(DEFAULT_VERSION_PARAM);
     RussianLowerCaseFilterFactory caseFactory = new RussianLowerCaseFilterFactory();
-    caseFactory.init(args);
+    caseFactory.init(DEFAULT_VERSION_PARAM);
     RussianStemFilterFactory stemFactory = new RussianStemFilterFactory();
-    stemFactory.init(args);
+    stemFactory.init(DEFAULT_VERSION_PARAM);
     Tokenizer tokenizer = factory.create(reader);
     TokenStream stream = caseFactory.create(tokenizer);
     stream = stemFactory.create(stream);



Mime
View raw message