I am using using elasticsearch, i have following fields in doc.
sale_start
sale_end
sale_price
selling_price
I want to query data which should be like:
if "sale_start" date and "sale_end" date is between the current date
then it should match the price range condition with sale_price
if "sale_start" date and "sale_end" date is not between the current date
then it should match the price range condition with selling_price
I searched a lot, but could not find a way to write condition like this. I am also new to elasticsearch. Thanks in advance