lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chhabra, Kapil" <kchha...@akamai.com>
Subject RE: TermFreqVector
Date Fri, 20 Jul 2007 08:52:34 GMT
http://lucene.apache.org/java/2_2_0/api/org/apache/lucene/search/Hits.ht
ml#id(int)

public final int id(int n)
             throws IOException

    Returns the id for the nth document in this set. Note that ids may
change when the index changes, so you cannot rely on the id to be
stable.


kapilChhabra

-----Original Message-----
From: Kevin Chen [mailto:chen_k80@yahoo.com] 
Sent: Friday, July 20, 2007 2:28 AM
To: java-user@lucene.apache.org
Subject: TermFreqVector

I need to use getTermFreqVector on a subset of docs that belong to the
hits for a query. I understand I need to pass the docNumber as an
argument in this case. How do I access that.

For ex .

doc = hits.doc(0);
TermFreqVector vector = reader.getTermFreqVector(docId, "field");


How do I get docId? 

       
---------------------------------
Looking for a deal? Find great prices on flights and hotels with Yahoo!
FareChase.

---------------------------------------------------------------------
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