lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <>
Subject Re: Lucene 4.0 getTermFreqVector and TermVectorMapper
Date Fri, 23 Mar 2012 17:20:10 GMT

The equivalent in trunk is IndexReader.getTermVectors.

It returns a Fields instance, just like "normal" postings
(IndexReader.fields()), except it's postings for just a single

So, you can pull a specific field, iterate the terms, get the
positions/offsets, etc.

I'll update MIGRATE.txt to note this.

Mike McCandless

On Fri, Mar 23, 2012 at 9:29 AM, Rok Rejc <> wrote:
> Hi all,
> I have upgraded my code to the latest trunk version.
> I my code I was using indexReader's function getTermFreqVector(spans.doc(),
> "Text", mapper);  and my mapper based on the TermVectorMapper (to count all
> the different collocators around the hit).
> In the latest version the function getTermFreqVector and the class
> TermVectorMapper dont exists anymore. What is the mechahism that has
> replaced mentioned function and class? Are there any documents about that?
> I have checked the migration.txt but have not found anything useful.
> Many thanks and have a nice week-end.
> Rok

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message