Andrew Cunningham wrote:
"computer dog"~50 looks like what I'm after - now is there someway I can call this and pull
out the number of total occurances, not just the number of documents hits? (say if computer
and dog occur near each other several times in the same document).

You could use a custom Similarity implementation for this query, where tf() is the identity function, idf() returns 1.0, etc., so that the final score is the occurance count. You'll need to divide by Similarity.decodeNorm(indexReader.norms("field")[doc]) at the end to get rid of the lengthNorm() and field boost (if any).


Doug

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



Reply via email to