For the query string, you don’t have to implement your own DSL. Elasticsearch supports it out of the box. You could POST a JSON object to “/_search” but you can also do a GET with the “q” query parameter.
Documentation: https://www.elastic.co/guide/en/elasticsearch/reference/curr...
In the Golang library you can use the “Search.WithQuery” option. This means you don’t have to construct a JSON request body.