totalTermFreq() tells you how many times this term occurred across the
entire index, I think TermsEnum.totaltermFreq javadocs explain this?

But, term vectors are an inverted index over a single document, so in
that context, totalTermFreq tells you how many times that term
occurred in that document.  Basically, it's the sum over a single
document.

Maybe we could improve the term vectors docs to explain that it's
really a single-doc inverted index?

Mike McCandless

http://blog.mikemccandless.com


On Fri, Oct 25, 2013 at 6:30 PM, Tom Burton-West <[email protected]> wrote:
> Hi all,
>
> I was reading some code that calls Lucene40TermVectorsReader
> TVTermsEnum
>
> The method totalTermFreq() actually returns freq and the method docFreq()
> returns 1.
> Once you think about the context this sort of makes sense but I found this
> confusing.
>
> I'm guessing there is a good reason for the method to be called
> totalTermFreq(), but I would like to know what that is.  Also is there
> documentation somewhere in the javadocs that explains this?
>
> Better yet, is there a good example of how to use the Lucene 4.x TermVectors
> API?
>
>
> Tom

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to