Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
Description
Using the eDismax Query Parser, if a query has boolean clauses, phrase matches are done on entire query rather than the sub queries created by the boolean operators.
Eg:
Query -
(gear AND cycle) OR (black AND cycle)
The parsed query for this is
"(((query:gear) + (query:cycle)) (+(query:black) + (query:cycle))) (phrase:\"gear cycle black cycle\")"
As can be seen the query conditions are as expected but I want the phrase match on "gear cycle" or "black cycle" .
Using boost/bq will not solve the use case because I also want to define phrase slop. So that a phrase match for "black cycle" will match documents like "black colour cycle".
Possible Solutions -
1. Apply the phrase match on the individual queries produced
2. Apply the phrase match on a different attribute than 'q'. As a workaround users can create the individual phrases to be matched and supply that to this attribute.