lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Rimmer" <>
Subject Is there a way to get numTokens via search?
Date Mon, 13 Oct 2008 12:02:40 GMT
I am doing a search using Lucene, and when I get the search results (hits),
I want to be able to get the number of tokens in a certain field.

Is this possible? Where is this sort of information stored?

I know the IndexSearcher.Explain can get some information, but it seems
mostly in free text and I cannot see the numTokens value.

Ideally what I would like to be able to do is get the NumTokens value and
the amount of hits within a field and display to the user what the "keyword
density" is as a percentage.

Any pointers would be greatly appreciated.



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