: > But, I think the original purpose of "bq" was to add clauses to the
: > main query... so in that sense it's working as designed. If bq
: > contains mandatory or prohibited clauses, then they become mandatory
: > or prohibited clauses of the main query.
:
: That doesn't make sense to me.... bq = _boosting_ query, not filtering query.
: Logically, it seems a bq query should not add or remove documents from the
: original query.
it was intended for boosting, but adding the clauses "as is" was
intentional so if you wanted to add clauses to the main that affected
mandatory things you could.
the thing that i think is triping you up is that the dismax parser
(when used as a QParser for the bq param) is producing a BooleanQuery with one
clauses, which is mandatory -- so the bq becomes mandatory even though
nothing in your bq param indicates it should be.
Ie: at the very end of DismaxQParser.parse, it should probably do
something like this...
List c = query.clauses();
if (1 == s.size() && MUST_NOT != s.get(0).getOccurs()) {
query = c.get(0).getQuery();
}
...alternately: maybe there should be a QParser that just wraps
DisjunctionMaxQueryParser using the "qf" and doesn't pay attention to any
of the other params at all.
-Hoss