Apache Lucene open-source search software
ant stub-factories: PersianNormalizationFilterFactory, signature cleanup of TrieTokenizerFactory, exclusion rule for SnowballFilter
Chris M. Hostetter042f7c0ba928
diff --git a/build.xml b/build.xmlindex 43e6b1d34f5..23fd020d9bc 100644--- a/build.xml+++ b/build.xml@@ -300,6 +300,10 @@<!-- solr and lucene both have one? ? ? ? --><regexp pattern="LengthFilter"/></linecontainsregexp>+ <linecontainsregexp negate="true">+ <!-- solr provides it's own SnowballPorterFilter variant -->+ <regexp pattern="SnowballFilter"/>+ </linecontainsregexp></inputfilterchain></redirector><arg line="${stub.src.dirs}"/>diff --git a/src/java/org/apache/solr/analysis/PersianNormalizationFilterFactory.java b/src/java/org/apache/solr/analysis/PersianNormalizationFilterFactory.javanew file mode 100644index 00000000000..981f8f18113--- /dev/null+++ b/src/java/org/apache/solr/analysis/PersianNormalizationFilterFactory.java@@ -0,0 +1,32 @@++/**+ * Licensed to the Apache Software Foundation (ASF) under one or more+ * contributor license agreements. See the NOTICE file distributed with+ * this work for additional information regarding copyright ownership.+ * The ASF licenses this file to You under the Apache License, Version 2.0+ * (the "License"); you may not use this file except in compliance with+ * the License. You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */+++package org.apache.solr.analysis;+import org.apache.lucene.analysis.fa.*;+import java.io.IOException;+import org.apache.lucene.analysis.TokenFilter;+import org.apache.lucene.analysis.TokenStream;+import org.apache.lucene.analysis.tokenattributes.TermAttribute;+import java.util.Map;+public class PersianNormalizationFilterFactory extends BaseTokenFilterFactory {+ public PersianNormalizationFilter create(TokenStream input) {+ return new PersianNormalizationFilter(input);+ }+}+diff --git a/src/java/org/apache/solr/analysis/TrieTokenizerFactory.java b/src/java/org/apache/solr/analysis/TrieTokenizerFactory.javaindex e975a4876a6..24aaf0cff98 100644--- a/src/java/org/apache/solr/analysis/TrieTokenizerFactory.java+++ b/src/java/org/apache/solr/analysis/TrieTokenizerFactory.java@@ -47,7 +47,7 @@ public class TrieTokenizerFactory extends BaseTokenizerFactory {this.precisionStep = precisionStep;}- public Tokenizer create(Reader input) {+ public TrieTokenizer create(Reader input) {return new TrieTokenizer(input, type, precisionStep, TrieTokenizer.getNumericTokenStream(precisionStep));}}@@ -115,4 +115,4 @@ class TrieTokenizer extends Tokenizer {public boolean incrementToken() throws IOException {return ts.incrementToken();}-}\ No newline at end of file+}