You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-commits@lucene.apache.org by ho...@apache.org on 2009/09/09 06:41:34 UTC
svn commit: r812768 - in /lucene/solr/trunk: build.xml
src/java/org/apache/solr/analysis/PersianNormalizationFilterFactory.java
src/java/org/apache/solr/analysis/TrieTokenizerFactory.java
Author: hossman
Date: Wed Sep 9 04:41:33 2009
New Revision: 812768
URL: http://svn.apache.org/viewvc?rev=812768&view=rev
Log:
ant stub-factories: PersianNormalizationFilterFactory, signature cleanup of TrieTokenizerFactory, exclusion rule for SnowballFilter
Added:
lucene/solr/trunk/src/java/org/apache/solr/analysis/PersianNormalizationFilterFactory.java (with props)
Modified:
lucene/solr/trunk/build.xml
lucene/solr/trunk/src/java/org/apache/solr/analysis/TrieTokenizerFactory.java
Modified: lucene/solr/trunk/build.xml
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/build.xml?rev=812768&r1=812767&r2=812768&view=diff
==============================================================================
--- lucene/solr/trunk/build.xml (original)
+++ lucene/solr/trunk/build.xml Wed Sep 9 04:41:33 2009
@@ -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}"/>
Added: lucene/solr/trunk/src/java/org/apache/solr/analysis/PersianNormalizationFilterFactory.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/java/org/apache/solr/analysis/PersianNormalizationFilterFactory.java?rev=812768&view=auto
==============================================================================
--- lucene/solr/trunk/src/java/org/apache/solr/analysis/PersianNormalizationFilterFactory.java (added)
+++ lucene/solr/trunk/src/java/org/apache/solr/analysis/PersianNormalizationFilterFactory.java Wed Sep 9 04:41:33 2009
@@ -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);
+ }
+}
+
Propchange: lucene/solr/trunk/src/java/org/apache/solr/analysis/PersianNormalizationFilterFactory.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: lucene/solr/trunk/src/java/org/apache/solr/analysis/PersianNormalizationFilterFactory.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Modified: lucene/solr/trunk/src/java/org/apache/solr/analysis/TrieTokenizerFactory.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/java/org/apache/solr/analysis/TrieTokenizerFactory.java?rev=812768&r1=812767&r2=812768&view=diff
==============================================================================
--- lucene/solr/trunk/src/java/org/apache/solr/analysis/TrieTokenizerFactory.java (original)
+++ lucene/solr/trunk/src/java/org/apache/solr/analysis/TrieTokenizerFactory.java Wed Sep 9 04:41:33 2009
@@ -47,7 +47,7 @@
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 @@
public boolean incrementToken() throws IOException {
return ts.incrementToken();
}
-}
\ No newline at end of file
+}