[pylucene-dev] ConstantScoreQuery
Andi Vajda
vajda at osafoundation.org
Thu Aug 23 10:15:52 PDT 2007
On Thu, 23 Aug 2007, tsuraan at tsuraan.net wrote:
> Is it possible to create a ConstantScoreQuery using a python-defined filter?
> I'm trying the following, and I get the pasted error:
>
>>>> class MyFilter(object):
> ... def bits(self, reader):
> ... return BitSet()
> ...
>>>> f=MyFilter()
>>>> q=ConstantScoreQuery(f)
> Traceback (most recent call last):
> File "<stdin>", line 1, in ?
> pybackend.thirdparty.PyLucene.lnxpyd.PyLucene.InvalidArgsError: (<type
> 'PyLucene.ConstantScoreQuery'>, '__init__', (<__main__.MyFilter object at
> 0xb7cda14c>,))
There is a bug in the ConstantScoreQuery constructor wrapper. It's not setup
to accept python filters. I fixed that now in svn rev 338.
Andi..
More information about the pylucene-dev
mailing list