Quoting Chris Hostetter <[EMAIL PROTECTED]>: > : 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. > > it sounds like what you want isn't really a special type of query, it's a > special type of query parser. > > all of hte individual cases you describe can be handled using Span > queries, and Term queries, you just need to wrap them all up in a > BooleanQuery with the various weights that you want.
I assume you refer to using BooleanQuery to OR them together? Would it achieve what I want: an ordered ranking with the best matching phrases at the top and least matching phrases at the bottom. > > : 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 > > > -Hoss > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]