0

I'm attempting to search for null or non-existant values for specific fields with query_string. My existing query is as follows:

{
    "query": {
        "query_string" : {
            "query" : "stringProperty.keyword:01 AND booleanProperty:false",
            "analyze_wildcard" : false,
            "allow_leading_wildcard": false
        } 
    }
}

Not sure if it's possible, I could not find anything useful in documentation.

1 Answer 1

1

In order to search for a document having a field with a null or non-existent value with query_string you can do it like this:

 "query" : "NOT(_exists_:stringProperty.keyword)"
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.