koursaros-ai / nboost

NBoost is a scalable, search-api-boosting platform for deploying transformer models to improve the relevance of search results on different platforms (i.e. Elasticsearch)
Apache License 2.0
674 stars 69 forks source link

Boolean Elastic Search query #87

Open kapish5467 opened 4 years ago

kapish5467 commented 4 years ago

Hi , I am trying to run the following ES boolean query-

'query' : {
'bool' : { 
  'must' :[{'match': {'Description':{"query":desc}}},
               {'match': {'Industry':{"query":" Legal, Search Engine, Software"}}}
            ]
       }
       }

And I using the following json body for nboost request-

'nboost': { 'uhost': 'localhost', 'uport': 9200, 'query_path': 'body.query.bool.must.match.', 'topk_path': 'body.size', 'default_topk': 10, 'topn': 50, 'choices_path': 'body.hits', 'cvalues_path': '_source.' }

I am getting the below error - {'doc': 'Could not parse query in request', 'msg': '()', 'type': 'MissingQuery'}

I tried to follow up with similar issues available but could not find a definte answer.

codeAshu commented 3 years ago

what is the --search_route ?

kapish5467 commented 3 years ago

Not using search route as I am running the query through python script.

samtamp95 commented 3 years ago

did you get this too work by any chance? I have trying something similar. apparently you are able to do a dynamic selecting fields to rerank but I haven't seem to be able to get to work.

something similar was brought: https://github.com/koursaros-ai/nboost/issues/24

we29758143 commented 3 years ago

same question