IndexReader.getTermFreqVectors(2)[0].getTermFrequencies()[5];

In the above example, Lucene gives me the term frequency of the 5th term
(e.g. say "planet") in the tfv of the corpus document "2".

But I need to get the term frequency for a specified term using its string
value.

E.g.:
term frequency of the term specified as "planet" (i.e. not specified in
terms of its position "5", but specified using its string value "planet").

Is there any way to do this?

I highly appreciate your kind reply!

Reply via email to