You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@solr.apache.org by Szűcs Roland <sz...@bookandwalk.hu> on 2021/06/17 19:04:30 UTC

nested edismax query with boost by json request api

Hi Solr community,
I use the latest solr version and the request library of python.
To make simple query in json request api format, I get what I expect. This
is the code:
json={
  "query": {
    "edismax": {
      "qf": "name^5 all_text^3 description",
      "query": "food"
    }
  }
}

requests.post(COLLECTION + '/select', json=json).json()
I went through the documentation but still I can not figure out how to
translate a nested query to json api. I would like to use the boost
parameter of the edismax query parser and the query function to get the
score of the sub query. The subquery would have the following parameters:
q=sterilized^3.5 big^2
qf=name^10 all_text^3 description
The term weights of the subquery comes from external calculation (customer
profile based on implicit feedback like click on product details or
buy...stc)

Using this approach I would like to give high precision SERP for the user
even if his main query is one or two words and there are hundreds of
matching results.

Thanks your help in advance,
Roland