@Anaethelion
Thanks for your comment in my previous thread. I updated my ES client so my app is using "github.com/elastic/go-elasticsearch/v7/esapi" as you suggested
And my search function is something like this now:
Right off the bat, what I'd suggest would be to remove the multiline string you have in the source field, just use a plain string to represent your script.
Previous thread: https://github.com/elastic/go-elasticsearch/issues/757
@Anaethelion Thanks for your comment in my previous thread. I updated my ES client so my app is using
"github.com/elastic/go-elasticsearch/v7/esapi"
as you suggested And my search function is something like this now:Query:
But I am still having JSON parsing errors when I add
_script
inside of theSort
field. ref- https://www.elastic.co/guide/en/elasticsearch/reference/6.4/search-request-sort.html#_script_based_sortingThe version of my ElasticSearch is 6.4
Would you guide me to use scrip-sort using the
go-elasticsearch
client?