aquasecurity / esquery

An idiomatic Go query builder for ElasticSearch
Apache License 2.0
305 stars 57 forks source link

Support query string query #25

Open mooijtech opened 2 years ago

mooijtech commented 2 years ago

Hello, Would it be possible to support a query string query with required must fields? References: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html

Prounckk commented 2 years ago

This would be amazing!

Isan-Rivkin commented 2 years ago

+1

tuziben commented 6 months ago

You could use CustomQuery

    queryString := map[string]interface{}{
        "query_string": map[string]interface{}{
            "query":            "(new york city) OR (big apple)",
            "analyze_wildcard": true,
        },
    }

    esquery.CustomQuery(queryString)