1) There's no need to send the same message twice just because you didn't
get a rapid response to hte first one ... in most parts of hte US this has
been a three day weekend, so it's not that suprising that no one wrote a
reply yet since the first time you asked this question friday night.

2) you need to be carefully about your terminology...

: I would like to know how many total results were found for my search.  In
: other words, if a Document contains the word or phrase more than once, I
: would like to know this information so that I can return a "true" count of
: search results that were found across all of my Documents.  It seems that

The total results of your search is Hits.length().
1 result is 1 matching document.  what you are asking for is information
about the frequency of a word or phrase.

The TermEnum class makes it easy to find out the frequency of a term in
your entire index.

The frequency of a phrase is more complicated.   I would suggest you start
by looking at the documenation on Similarity and the way scores are
calculated.  I believe that it is possible to write an implimentation of
Similarity that will result in the raw score of a PhraseQuery on
any document being the number of times that phrase appears in the
document. You will then need to use a HitCollector to sum the raw scores
so they don't get normalized for you.




-Hoss


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to