Skip to content

Instantly share code, notes, and snippets.

@mottaquikarim
Created December 29, 2020 17:15
Show Gist options
  • Save mottaquikarim/e3abacd8e091efd60c82fca77add1b68 to your computer and use it in GitHub Desktop.
Save mottaquikarim/e3abacd8e091efd60c82fca77add1b68 to your computer and use it in GitHub Desktop.
package main
import (
"fmt"
"github.com/mottaquikarim/esquerydsl"
)
func main() {
_, body, _ := esquerydsl.GetQueryBlock(esquerydsl.QueryDoc{
Index: "some_index",
Sort: []map[string]string{map[string]string{"id": "asc"}},
And: []esquerydsl.QueryItem{
esquerydsl.QueryItem{
Field: "some_index_id",
Value: "some-long-key-id-value",
Type: "match",
},
},
})
fmt.Println(body)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment