For some reason it seems the Document.getFields() method returns a
List of fields that are not of the type Field. As you'll see below,
they don't have the same type or attributes:
>>> doc = lucene.Document()
>>> field = lucene.Field("myfield", lucene.StringReader("mystring"))
>>> field
<Field: indexed,tokenized<myfield:[EMAIL PROTECTED]>>
>>> field.name()
u'myfield'
>>> doc.add(field)
>>> fields = doc.getFields()
>>> fields.get(0)
<Object: indexed,tokenized<myfield:[EMAIL PROTECTED]>>
>>> fields.get(0).name()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'Object' object has no attribute 'name'
Any ideas?
Thanks!
TJ
_______________________________________________
pylucene-dev mailing list
pylucene-dev@osafoundation.org
http://lists.osafoundation.org/mailman/listinfo/pylucene-dev