lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject RE: Document ID
Date Sat, 25 Jun 2005 22:29:32 GMT

: The simple question - I have a document and I add it into index with
: TermVector support.
: How can I simply retrive the TermVector information for the document?
: 	TermFreqVector vector = reader.getTermFreqVector(document)?
: 	reader.delete(document);
: Etc..

Open an IndexReader, and either search for the document you want, or use a
TermEnum to seek to it (assuming you have a unique field containing your
own identifier for the data).  then use the same IndexReader to get the
TermVector information.

As long as you have that IndexReader open, the internal doc id will be
consistent (for that reader).


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message