lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Noll <dan...@nuix.com.au>
Subject Re: How can I get a term's frequency?
Date Wed, 22 Feb 2006 05:19:32 GMT
sog wrote:
> 
> I search the index with a group of terms. I want to get every term's 
> frequency in each document of the search result.

Are you looking for this?

TermFreqVector vector = IndexReader.getTermFreqVector(docNum, "field");

That gives you the frequency of every term, but you can just look up the
ones you're interested in.

Daniel


-- 
Daniel Noll

Nuix Australia Pty Ltd
Suite 79, 89 Jones St, Ultimo NSW 2007, Australia
Phone: (02) 9280 0699
Fax:   (02) 9212 6902

This message is intended only for the named recipient. If you are not
the intended recipient you are notified that disclosing, copying,
distributing or taking any action in reliance on the contents of this
message or attachment is strictly prohibited.

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