I've got json that I want to translate into an Elasticsearch query using https://godoc.org/gopkg.in/olivere/elastic.v5
json =
{
"query": {
"bool": {
"filter": [
{
"exists": {
"field": "Videos.en"
}
}
]
}
}
}
Pretty simple! What I've got so far - which clearly isn't working - is:
enVidsQuery, err := elastic.NewBoolQuery().
Filter(elastic.Exists("field", "Videos.en"))
Where elastic
references "gopkg.in/olivere/elastic.v5" in my imports.
Can anyone provide me with the correct syntax? I figure it's a trivial solution for anyone familiar with the library.