lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Kor <s0454...@sms.ed.ac.uk>
Subject A special PhraseQuery
Date Fri, 20 May 2005 19:29:54 GMT
Hi all, its me again.

I'm in need of a special version of the phrase query. For example, given a
search phrase "alpha beta gamma", I'ld like a to score documents something like
the following manner.

If document contains exactly "alpha beta gamma", score = 1
If document contains "alpha gamma beta" score = 0.9
If document contains "gamma alpha beta" score = 0.8
If document contains "gamma beta alpha" score = 0.7
If document contains "alpha beta" score = 0.666
If document contains "beta gamma" score = 0.666
If document contains "alpha gamma" score = 0.666
If document contains "alpha" score = 0.333
If document contains "beta"  score = 0.333
If document contains "gamma" score = 0.333


Has anyone done something like this? Or do I have to take apart and rewrite
PhraseScorer or SloppyPhraseScorer to achieve this?


Regards,
Dave Kor.

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message