[pylucene-dev] argument error in document.getFields()

Andi Vajda vajda at osafoundation.org
Thu Jan 18 22:32:27 PST 2007


On Fri, 19 Jan 2007, David wrote:

>    in Lucene JavaDoc,   the getFields signature is :  public final
> List<http://java.sun.com/j2se/1.4/docs/api/java/util/List.html>
> *getFields*()
>    I use PyLucene and write the following code:
>       for i, doc in hits:
>           fields = doc.getFields()
>           for field in fields:
>               rev[field] = doc(field)
>           yield rev
>    but the interpreter give me the following error:
>        File "D:\work\contentstore\contentstore\backends\lucene\base.py",
> line 157, in search
>           fields = doc.getFields()
>        TypeError: getFields() takes exactly one argument (0 given)
>
>    how to fix this error?
>
> Appreciate your help!

It's a bug - an oversight - in PyLucene.
I just checked in the fix.

Andi..


More information about the pylucene-dev mailing list