lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rm...@apache.org
Subject svn commit: r823546 - /lucene/java/trunk/contrib/analyzers/common/src/test/org/apache/lucene/analysis/fa/TestPersianAnalyzer.java
Date Fri, 09 Oct 2009 13:27:15 GMT
Author: rmuir
Date: Fri Oct  9 13:27:14 2009
New Revision: 823546

URL: http://svn.apache.org/viewvc?rev=823546&view=rev
Log:
For fa analyzer, add a test for custom stopwords

Modified:
    lucene/java/trunk/contrib/analyzers/common/src/test/org/apache/lucene/analysis/fa/TestPersianAnalyzer.java

Modified: lucene/java/trunk/contrib/analyzers/common/src/test/org/apache/lucene/analysis/fa/TestPersianAnalyzer.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/analyzers/common/src/test/org/apache/lucene/analysis/fa/TestPersianAnalyzer.java?rev=823546&r1=823545&r2=823546&view=diff
==============================================================================
--- lucene/java/trunk/contrib/analyzers/common/src/test/org/apache/lucene/analysis/fa/TestPersianAnalyzer.java
(original)
+++ lucene/java/trunk/contrib/analyzers/common/src/test/org/apache/lucene/analysis/fa/TestPersianAnalyzer.java
Fri Oct  9 13:27:14 2009
@@ -213,5 +213,14 @@
     assertAnalyzesToReuse(a, "خورده مي شده بوده
باشد", new String[] { "خورده" });
     assertAnalyzesToReuse(a, "برگ‌ها", new String[] { "برگ"
});
   }
+  
+  /**
+   * Test that custom stopwords work, and are not case-sensitive.
+   */
+  public void testCustomStopwords() throws Exception {
+    PersianAnalyzer a = new PersianAnalyzer(new String[] { "the", "and", "a" });
+    assertAnalyzesTo(a, "The quick brown fox.", new String[] { "quick",
+        "brown", "fox" });
+  }
 
 }



Mime
View raw message