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

David zhouchengly at gmail.com
Thu Jan 18 22:19:03 PST 2007


Hi all :
     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!


-- 
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osafoundation.org/pipermail/pylucene-dev/attachments/20070119/274a1673/attachment.html


More information about the pylucene-dev mailing list