[pylucene-dev] is it possible to write a custom analyzer?

Victor Ng crankycoder at gmail.com
Tue Jan 4 10:41:06 PST 2005


Thanks Andi!  That works like a charm.  

Are there any threading issues that I should be aware of when using
PyLucene?  I'm aware of the threading issue in bug 2291 in bugzilla,
and that there's some kind of performance problem w.r.t the global
interpreter lock?

vic


On Tue, 4 Jan 2005 10:13:28 -0800 (PST), Andi Vajda
<vajda at osafoundation.org> wrote:
> 
> Yes, you can write an Analyzer implementation in python, take a look at the
> test_PositionIncrement.py unit test suite. The very first unit test in there,
> testSetPosition, does that. Basically, any python class with a method called
> tokenStream that takes self, fieldName and reader as arguments can be passed
> to Lucene as an Analyzer.
> The same applies for a number of Lucene classes. The complete list is defined
> by the classes in the java/org/osafoundation source tree whose name starts
> with 'Python'.
> 
> Andi..
> 
> On Tue, 4 Jan 2005, Victor Ng wrote:
> 
> > Is it possible to write a custom analyzer in Python for PyLucene?
> >
> > I want to have an analyzer that is similar to the StandardAnalyzer,
> > but with a different set of stopwords.
> >
> > vic
> > _______________________________________________
> > pylucene-dev mailing list
> > pylucene-dev at osafoundation.org
> > http://lists.osafoundation.org/mailman/listinfo/pylucene-dev
> >
>


More information about the pylucene-dev mailing list