I am working on some recommendation problem as mine college project so task is to recommend a activity based on search term given by user and I am able to recommend similar result based on query. But I want to add filter so as to recommend that result on location based also and I have used following query but I am getting some error in that like - "term": {"state": ["IL"]}
TypeError: unhashable type: 'dict'
Elastic query-
{
"query": {
"more_like_this": {
"fields": ["Categories", "Title", "About"],
"like": query,
"min_term_freq": 1,
"min_doc_freq": 30
},
"bool": {
"filter": [{
"term": {
"state": "IL"
}
}]
}
}
}
Thank you in advance