lucene-pylucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From va...@apache.org
Subject svn commit: r1758134 - /lucene/pylucene/trunk/test/test_StopWords.py
Date Sun, 28 Aug 2016 17:56:00 GMT
Author: vajda
Date: Sun Aug 28 17:56:00 2016
New Revision: 1758134

URL: http://svn.apache.org/viewvc?rev=1758134&view=rev
Log:
test_StopWords.py passes

Modified:
    lucene/pylucene/trunk/test/test_StopWords.py

Modified: lucene/pylucene/trunk/test/test_StopWords.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/test_StopWords.py?rev=1758134&r1=1758133&r2=1758134&view=diff
==============================================================================
--- lucene/pylucene/trunk/test/test_StopWords.py (original)
+++ lucene/pylucene/trunk/test/test_StopWords.py Sun Aug 28 17:56:00 2016
@@ -15,9 +15,8 @@
 import sys, lucene, unittest
 
 from java.io import StringReader
-from org.apache.lucene.analysis.core import StopFilter
+from org.apache.lucene.analysis import StopFilter
 from org.apache.lucene.analysis.standard import StandardTokenizer
-from org.apache.lucene.util import Version
 
 
 # run with -loop to test fix for string local ref leak reported
@@ -28,15 +27,15 @@ class StopWordsTestCase(unittest.TestCas
     def setUp(self):
 
         stopWords = ['the', 'and', 's']
-        self.stop_set = StopFilter.makeStopSet(Version.LUCENE_CURRENT,
-                                               stopWords)
+        self.stop_set = StopFilter.makeStopSet(stopWords)
         self.reader = StringReader('foo')
 
     def testStopWords(self):
 
         try:
-            result = StandardTokenizer(Version.LUCENE_CURRENT, self.reader)
-            result = StopFilter(Version.LUCENE_CURRENT, result, self.stop_set)
+            result = StandardTokenizer()
+            result.setReader(self.reader)
+            result = StopFilter(result, self.stop_set)
         except Exception, e:
             self.fail(str(e))
 



Mime
View raw message