lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Jakl <>
Subject Re: edismax/dismax/Lucene Query Parser converts some fields to be "mandatory"
Date Mon, 23 Jan 2012 18:55:26 GMT

On Mon, Jan 23, 2012 at 18:42, Erick Erickson <> wrote:
> Count your parentheses (anyone here speak Lisp?) I think that +
> is outside the entire clause, meaning it's saying that there is
> a single mandatory clause, and it's the whole thing....

You're right in that case it's the whole query. Pardon me, I chose a
bad example. Using your input concerning the boost values, here
another (cleaner) example (edited for readability):

<str name="querystring">
 OR "haskell"
 OR "python"
 OR "ruby"
 AND "programming"
 OR "programming language"
 OR "code coding"
 OR -"mobile"
 OR -"android"
 OR -"microsoft"
 OR -"windows"
<str name="parsedquery">
 DisjunctionMaxQuery((stemmedText:"program language"))
 DisjunctionMaxQuery((stemmedText:"code code"))

I've tried this using the three mentioned query parsers, all promote
"ruby" and "program" to be mandatory. I was hoping for a
"dontBeTooSmart=true" switch or something.

> But boosting by 0.0 is probably a really bad thing. This may be
> dropping all the scores to 0, which means "no match". The
> default boost is 1.0 since it's multiplied to influence the score,
> not added. So I'd try either not boosting or making
> it something other than 0.

Thank you very much for spotting this. The FAQ[1] is a bit confusing
on that matter, if a boost of 0.0001 is still a boost, so 0.0 must be
no boost at all, at least that was my logic.



View raw message