lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nader S. Henein" <>
Subject RE: Count for a keyword occurance in a file
Date Thu, 29 Apr 2004 06:14:44 GMT
Tricky, scoring has to do with the frequency of the occurrence of the word
as opposed to the amount of words in the file in general (Somebody correct
me if I'm wrong) , so short of an educated approximation, you could hack the
indexer to dynamically store the frequency of a word (oh so unadvisable).
Personally I recommend the educated approximation, because you could index
the document with the number of words in it ( you would have to make sure
you're not using Stop Word Analyzer or Port Stemmer) and then based on the
score reverse engineer the result you want.

Nader Henein

-----Original Message-----
From: hemal bhatt [] 
Sent: Wednesday, April 28, 2004 5:50 PM
To: Lucene Users List
Subject: Count for a keyword occurance in a file


How can I get a count of the score given by Hits.Score().
i.e I want to know how many times a keyword occurs in a file. Any help on
this would be appreciated.
Hemal Bhatt

Hemal bhatt

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

View raw message