Perhaps the Complex Phrase Query Parser might be what you are looking for. https://lucene.apache.org/solr/guide/7_3/other-parsers.html
// On 3/25/19, 1:41 AM, "krishan goyal" <krishan1...@gmail.com> wrote: Hi, I want to execute a solr query with boolean clauses using the eDismax Query Parser. But the phrase match is executed on the complete query and not on the individual queries which are created. Is it possible to have both boolean conditions in query and phrase matches ? Eg: Query - (gear AND cycle) OR (black AND cycle) The parsed query for this is "+((+(query:gear)~0.01 +(query:cycle)~0.01) (+(query:black)~0.01 +(query:cycle)~0.01)) (phrase:\"gear cycle black cycle\")~0.01" 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". Is it possible to either 1. Apply the phrase match on the individual queries produced ? 2. Apply the phrase match on a different attribute than 'q'. As a workaround I can create the individual phrases to be matched and supply that to this attribute. 3. Or any other solution for this use case ? Thanks Krishan