lucene-java-user mailing list archives

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

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

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

http://blog.mikemccandless.com

On Fri, Mar 23, 2012 at 9:29 AM, Rok Rejc <rokrejc82@gmail.com> 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: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message