elasticsearch - Sort not working as expected -
i having issue sorting query results. essentially, query should return events (metatype field) based on relevance , sorted date, newest first. when put sort in query, returns same exact results, regardless of query is.
this query. can see i'm doing wrong here? thank in advance.
"query": {
"bool": { "should": [ { "match": { "sortabletitle": { "query": query, "operator": "and" }}}, { "match": { "content": { "query": query, "operator": "or" }}}, { "match": { "description": { "query": query, "operator": "or" }}}, ], "must": { "match": { "metatype":{ "query": "event" }}}, },//end bool },//end query "sort": [ { "created": { "order": "desc" }}, { "_score": { "order": "desc" }} ]
Comments
Post a Comment