Daniel Shane wrote:
For example, if I have terms A, B and C and I do a simple boolean search
: A
B C, I would like to have a query that behaves a bit like if I rewrote this
query as such :

+A +B +C "A B" "B C" "A B C"

This would boost results where the exact string "A B C" or any substring
like "A B" or "B C" are found.

You could extend ExactPhraseScorer and override phraseFreq() to first compute a (weighted) sum the freq() of each TermPositions in the PhrasePositions. The weighting should probably be something like sqrt(freq)/idf(term).

Doug

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

Reply via email to