How can I generate an elasticsearch query from a boolean expression, using Python?

How can I generate an elasticsearch query from a boolean expression, using Python?

ok according to:

https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html

I can do query like:

{
    query: {
        query_string : {
            default_field : text,
            query : (this AND (submitted OR flowers) AND NOT blight
        }
    }
}

which works great.

How can I generate an elasticsearch query from a boolean expression, using Python?

Leave a Reply

Your email address will not be published. Required fields are marked *