Hi all,
Still brand new to ElasticSearch (and JSON for that matter). I get this error:
{
"error": {
"root_cause": [
{
"type": "parsing_exception",
"reason": "Unknown key for a START_OBJECT in [should].",
"line": 19,
"col": 4
}
],
"type": "parsing_exception",
"reason": "Unknown key for a START_OBJECT in [should].",
"line": 19,
"col": 4
},
"status": 400
}
When making this call to my ElasticSearch Index:
{
"size": 150,
"query": {
"bool": {
"must": {
"nested": {
"path": "entities",
"query": {
"match": {
"entities.name": "donald trump"
}
}
}
}
}
},
"should":
{
"nested": {
"path": "entities",
"query": {
"match_phrase": {
"entities.name": {
"query": "donald trump",
"slop": 5
}
}
}
}
},
"rescore": {
"window_size": 2000,
"query": {
"score_mode": "max",
"rescore_query": {
"nested": {
"path": "entities",
"score_mode": "max",
"query": {
"function_score": {
"doc_score": {
"field": "entities.name",
"query_value": "donald trump"
}
}
}
}
}
}
},
"query_weight": 0,
"rescore_query_weight": 1
}
Would someone be kind enough to guide me on correcting this error, as well as let me know if you see anything else in this query that I need to correct?
Many thanks!