doc.getFields argument error

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

doc.getFields argument error

David-317
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
Reply | Threaded
Open this post in threaded view
|

Re: doc.getFields argument error

Chris Hostetter-3

:             fields = doc.getFields()
:          TypeError: getFields() takes exactly one argument (0 given)
:
:      how to fix this error?

this sounds like a problem with the port ... when you have questions about
using pylucene please start by mailing the pylucene community before
mailing the java-user list.

forgive me if you already tried this -- but there's no record of it in the
pylucene mailing list archive...

http://lists.osafoundation.org/pipermail/pylucene-dev/2007-January/author.html




-Hoss


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: doc.getFields argument error

David-317
Yes, It is a bug of PyLucene.Thanks!

2007/1/19, Chris Hostetter <[hidden email]>:

>
>
> :             fields = doc.getFields()
> :          TypeError: getFields() takes exactly one argument (0 given)
> :
> :      how to fix this error?
>
> this sounds like a problem with the port ... when you have questions about
> using pylucene please start by mailing the pylucene community before
> mailing the java-user list.
>
> forgive me if you already tried this -- but there's no record of it in the
> pylucene mailing list archive...
>
>
> http://lists.osafoundation.org/pipermail/pylucene-dev/2007-January/author.html
>
>
>
>
> -Hoss
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>


--
David