Hi, Thanks for the feedback on why the NEAR operator was not yet incorporated. I didn't understand all the issues for not using the NEAR operator. For my purposes, I am fine with these limitations and describe them in the search documentation.
However, as a potential solution, what do people think about a multi-level slop functionality? That is having the slop really be an array of distances between terms. So "foo bar" NEAR3 "unga bunga" would be translated into Foo within 1 of bar within 3 of unga within 1 of bunga. This would become a single phrase query, but the "slop" would be variable between each word. One potential problem with this is dealing with the boost factor across different phrase queries may be different. Also, this would be interesting trying to make this work with Term highlighting. >From a quickly reading over the code (please verify this), I think that this would be possible by creating (or potentially modifying) a new MultiSloppyPhraseScorer.java based on SloppyPhraseScorer.java. If people think this is on the right path, I will try to get it working. --Peter On 2/16/02 10:15 AM, "Brian Goetz" <[EMAIL PROTECTED]> wrote: >> I propose that we use the foo near# bar method. > > The problem with this is that PhraseQuery only can combine terms. > So while > "foo bar" NEAR "unga bunga" > might parse, Lucene can't turn this into a phrase query. > > Similarly, what do you plan to do with > foo NEAR5 bar NEAR10 glop > ? > > (If it were as easy as adding a NEAR operator, we'd have had one a > long time ago.) > > Since NEAR really is a modify on the phrase query, it seems like some > sort of syntax attached to the existing double-quote syntax makes more > sense, unless you think you can extend the slop-phrase concept to > allow for arbitrary queries as components. > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
