Using the
defType=edismax
parameter, it's possible to combine the usage of Edismax and Lucene together at the same time. Moreover, we can execute more restrictive queries nested one into another by performing the following steps:
painting
in the abstract field, and then we define a nested query using the Edismax query parser ({!dismax ...})
as follows:>> curl -X GET 'http://localhost:8983/solr/paintings/select?q=abstract:painting%20AND%20_query_:%22{!dismax%20qf=artist^2%20qf=abstract%20pf=abstract^3%20mm=3%20v=$qq}%22&fl=title%20artist&wt=json&qq=giraffe%20dali%20%22female%20figure%22%20vermeer'
If you look carefully at the parameter sequence of this simple nested query, you will find that the most interesting part is the following code:
q=abstract:painting AND _query_:"{!dismax qf=artist^2 qf=abstract pf=abstract^3 mm=3 v=$qq}" qq=giraffe dali "female figure" vermeer
We are actually performing two different kinds of queries and then combining them with an AND condition, so that they have to be verified at the same time. Please consider that the qq
parameter name cannot be changed at the moment, and it's used to define what you can see as a sort of local variable, useful for writing the nested query text in a clearer form.
3.149.214.60