List Info

Thread: TermFreqVector




TermFreqVector
country flaguser name
United States
2007-07-19 15:58:29
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.
Re: TermFreqVector
country flaguser name
Sweden
2007-07-19 16:13:18
19 jul 2007 kl. 22.58 skrev Kevin Chen:

>
> doc = hits.doc(0);
> TermFreqVector vector = reader.getTermFreqVector(docId,
"field");
>
>
> How do I get docId?

If you use Hits, it is hits.doc()


-- 
karl

------------------------------------------------------------
---------
To unsubscribe, e-mail: java-user-unsubscribelucene.apache.org
For additional commands, e-mail: java-user-helplucene.apache.org


Re: TermFreqVector
country flaguser name
United States
2007-07-19 16:24:19
hits.id() should work.


karl wettin wrote:
>
> 19 jul 2007 kl. 22.58 skrev Kevin Chen:
>
>>
>> doc = hits.doc(0);
>> TermFreqVector vector =
reader.getTermFreqVector(docId, "field");
>>
>>
>> How do I get docId?
>
> If you use Hits, it is hits.doc()
>
>


------------------------------------------------------------
---------
To unsubscribe, e-mail: java-user-unsubscribelucene.apache.org
For additional commands, e-mail: java-user-helplucene.apache.org


RE: TermFreqVector
user name
2007-07-20 03:52:34
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_k80yahoo.com] 
Sent: Friday, July 20, 2007 2:28 AM
To: java-userlucene.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-unsubscribelucene.apache.org
For additional commands, e-mail: java-user-helplucene.apache.org


[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )