[pylucene-dev] How to use Document.Fields()?
Andi Vajda
vajda at osafoundation.org
Fri Jan 19 08:46:04 PST 2007
On Fri, 19 Jan 2007, David wrote:
> Hi all:
> Cause Document.getFields can't be used in PyLucene
> (http://lists.osafoundation.org/pipermail/pylucene-dev/2007-January/001506.html)
> I tried to use Document.fields() to get all the fields of a document,
> as the following code:
> for i, doc in hits:
> _fields = doc.fields()
> print _fields
> for field in _fields:
> print field
> rev[field] = doc.get(field)
> yield rev
> but it seems not work, can anybody give some example to use this function?
>
It works fine for me, please submit a complete code sample that reproduces the
problem. Also tell us what version of PyLucene, OS and Python you're using.
Thanks !
Andi..
More information about the pylucene-dev
mailing list