Query fails when value is empty - how do I work around this?

Hi there,

We are parsing our query via a form, and this form has 29+ inputs.

Therefore there are many occassions where part of the full JSON query might have an empty value if the end user does not use one of the 29 + inputs.

I looked at applying null value to the index (here)

But in further review, it looks like this won't solve the issue.

What would be the correct way for ES to essentially ignore a query string as part of the full JSON query that does not have a value, or, can I default the value to something for it to be ignore (e.g. my initial idea of using 'null'.

Appreciate any help here.

I would recommend generating the query based on the inputs provided rather than try to populate a static query template, which seems to be similar to what you are doing now.