lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
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).


-Hoss


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message