I have a following query which works as expected using edismax
q=Golden Door
qf=book_title^4 book_description^2 tags^1.2
pf=book_title~2^6 book_description~125^2
Above query generate the following edismax query, which is correct:
+(+DisjunctionMaxQuery(((tags:golden)^1.2 | (book_description:golden)^2.0 | (book_title.text:golden)^4.0)) +DisjunctionMaxQuery(((book_title:door)^4.0 | (tags:door)^1.2 | (book_description:door)^2.0))) (+DisjunctionMaxQuery(((book_title:"golden door"~2)^6.0))) (+DisjunctionMaxQuery(((book_description:"mot tester"~125)^2.0)))
However I want to pass different search strings to search fields and also give "query field" boost and "phrase field" boost but I'm not sure what is the correct syntax to make such query. e.g I want to search "Golder Door" on "book_title" and "Suspense Golder Door" to book_description field while keeping the query and phrase boost.
I tried something like below and many other combinations but none of them is generating the parsed edismax query with correct phrase query or boost factor.
q=book_title:(Golden Door) book_description:(Suspense Golden Door)
qf=book_title^4 book_description^2
pf=book_title~2^6 book_description~125^2
Above query generated following edismax parsed query. In parsed query query field boosts are missing and phrase query is "door golden door" which I have not even given.
+(+(+(+book_title:golden +book_title:door)) +(+(+book_description:suspense+book_description:golden +book_description:door))) (+DisjunctionMaxQuery(((book_title:"door golden door"~2)^6.0))) (+DisjunctionMaxQuery(((book_description:"door golden door"~125)^2.0)))
I tried various combination of parameters, including aliases, with edismax but one of them has generated edismax query as expected