You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by alex <so...@gmail.com> on 2006/11/18 18:02:16 UTC

Add a document in a single pass?

Hi,

I have a stream-based document parser that extracts contents (as a character
stream) as well as document metadata (as strings) from a file, in a single
pass. From these data I want to create a Lucene document. The problem is
that the metadata are available not until the complete document has been
parsed, i.e. after IndexWriter.addDocument returned.

Is there a way to affect the order the document fields are processed in
IndexWriter.addDocument or another way to build the index efficiently?
Thanks in advance
Alex