0

In SQL, we can perform the following in the where clause:

SELECT * FROM tbl WHERE :parameter <> '' OR :parameter is not null

Is this possible in elastic search to check if the input parameter/value is not null or empty? I checked the exists query but the parameter is a field, not a value.

1 Answer 1

0

You can use SQL API or using Exists Query.

Ex:

POST /_sql?format=txt
{
   "query": "SELECT * FROM bar WHERE Id <> '' AND Id is not null"
}
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.