lucene-pylucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roman Chyla <roman.ch...@gmail.com>
Subject PatternAnalyzer not implemented?
Date Fri, 01 Oct 2010 13:09:42 GMT
Hello,

I tried to use the PatternAnalyzer, but am getting NotImplementedError
- in case it is not available, shall I rather use PythonAnalyzer and
implement the regex pattern analyzer with that?

using version: 2.9.3

In [44]: import lucene
In [45]: import pyjama #<-- this package contains java.util.regex.Pattern
In [46]: p = pyjama.Pattern.compile("\\s")
In [47]: p
Out[47]: <Pattern: \s>
In [48]: import lucene.collections as col
In [49]: s = col.JavaSet([])
In [50]: s
Out[50]: <JavaSet: org.apache.pylucene.util.PythonSet@16925b0>
In [51]: pa = lucene.PatternAnalyzer(p,True,s)
---------------------------------------------------------------------------
NotImplementedError                       Traceback (most recent call last)

/Users/rca/<ipython console> in <module>()

NotImplementedError: ('instantiating java class', <type 'PatternAnalyzer'>)

In [52]:

Kind regards,

  roman

Mime
View raw message