On Fri, Nov 14, 2008 at 12:05 PM, Teruhiko Kurosaka <[EMAIL PROTECTED]> wrote: > My problem with Phrase Query is that it requires > existence of all the terms in documents. I want them more > permissible. I want it to match with lower score. > Does dismax also requires all the terms?
The mandatory part +(DEF GHI) selects documents with either term and scores higher if both terms are present. The sloppy phrase query part "DEF GHI"~10^5 is optional and only contributes to the score when both terms appear near each other (and scores higher the closer together they are). -Yonik >> Solr's dismax parser can generate queries that do most of >> this... it's a combination of term queries and sloppy phrase queries. >> >> Simplest example: >> +(DEF GHI) "DEF GHI"~10^5 >> >> The only thing that it doesn't work for is the terms out of >> order (they will still be matched). You could use span >> queries if you really need that ordering, but sloppy phrase >> queries already penalize the out-of-order since it's a bigger >> edit distance (but it won't be a "severe" penalty). > > ---- > T. "Kuro" Kurosaka, Basis Technology > San Francisco, California, U.S.A. > > > --------------------------------------------------------------------- > 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]