A simple way is to query using debugQuery=true and parse the output:

0.74248177 = queryWeight(rawText:python), product of:
       2.581456 = idf(docFreq=16017)
      0.28762132 = queryNorm
0.4191762 = (MATCH) fieldWeight(rawText:python in 950285), product of:
       5.196152 = tf(termFreq(rawText:python)=27)
       2.581456 = idf(docFreq=16017)
       0.03125 = fieldNorm(field=rawText, doc=950285)

The =27 is the number of times 'python' appears in this document.

You could also write a custom component that included in this information in the response.

-Mike

On 18-Aug-08, at 8:16 PM, Gene Campbell wrote:

Thank you for the response.  Always nice to have something willing to
validate your thinking!

Of course, if anyone has any ideas on how to get the numbers of times
term is repeated in a document,
I'm all ears.

cheers
gene


On Tue, Aug 19, 2008 at 1:42 PM, Norberto Meijome <[EMAIL PROTECTED]> wrote:
On Tue, 19 Aug 2008 10:18:12 +1200
"Gene Campbell" <[EMAIL PROTECTED]> wrote:

Is this interpreted as meaning, there are 10 documents that will match
with 'car' in the title, and likewise 6 'boat' and 2 'bike'?

Correct.

If so, is there any way to get counts for the *number times* a value
is found in a document. I'm looking for a way to determine the number
of times 'car' is repeated in the title, for example

Not sure - i would suggest that a field with a term repeated several times would receive a higher score when searching for that term, but not sure how you could get the information you seek...maybe with the Luke handler ? ( but on a per-document basis...slow... ? )

B
_________________________
{Beto|Norberto|Numard} Meijome

Computers are like air conditioners; they can't do their job properly if you open windows.

I speak for myself, not my employer. Contents may be hot. Slippery when wet. Reading disclaimers makes you go blind. Writing them is worse. You have been Warned.


Reply via email to