-
Notifications
You must be signed in to change notification settings - Fork 70
Description
Here is an example for my query. I added another field 'Name' in travel.csv. I successfully generated the nboost-index already. I am wondering am I making any mistake while doing the query?
The reason is I want to make query on both 'Name' and 'passage' fields, in order to make my result to be more specific. I am wondering can I do that?
import requests
from pprint import pprint
response = requests.get(
url='http://localhost:8000/travel_add/_search',
json={
'nboost': {
'uhost': 'localhost',
'uport': 9200,
'query_path': 'body.query.match.',
'topk_path': 'body.size',
'default_topk': 10,
'topn': 50,
'choices_path': 'body.hits.hits',
'cvalues_path': '_source.'
},
'size': 10,
'query': {
'match': {'Name': 'Jack',
'passage': 'flight'}
}
}
)
pprint(response.json())
Error message:
{'doc': 'Mapping key not found.', 'msg': "('hits',)", 'type': 'KeyError'}