I'm upgrading from Lucene 3.6 to Lucene 4.0-beta. In Lucene 3.x, the IndexReader
contains a method IndexReader.getTermFreqVectors()
, which I can use to extract the frequency of each term in a given document and field.
This method is now replaced by IndexReader.getTermVectors()
, which returns Terms
. How can I make use of this (or probably other methods) to extract the term frequency in a document and a field?