Filter by any field

I have an elasticsearch Document that has around 15 fields.
I should be able to target every field for filtering.

But sometimes, I need to filter documents by CategoryName and MerchantID,
While other time I need to filter documents by CategoryID and Price. etc

I have written a query packing all the 15 fields.

If I don't provide values for the remaining 13 fields it throws an error saying value missing.
Is there any methodology in elasticsearch that would make the behaviour dynamic??

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.