lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Vogel <globallyuni...@gmail.com>
Subject BasicStats numberOfFieldTokens
Date Thu, 28 Feb 2013 21:27:37 GMT
In the score method of a subclass of SimilarityBase I was expecting the
numberOfFieldTokens field of the BasicStats parameter to be the number of
tokens in the field.  It instead seems to be returning the number of times
the token currently being scored occurs in all documents.  For example:

Doc 1
field fp has values F123, F999

Doc 2
field fp has values F123 F456 F789

A query of fp:(F123 F456 F789) calls the score method 3 times to score Doc
2 as the only document that matches with values of:
numberOfFieldTokens = 2
numberOfFieldTokens = 1
numberOfFieldTokens = 1

while I was hoping for numberOfFieldTokens= 3 on all the calls.

If this is the correct behavior then is there a way to get the number of
tokens in the field

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message