I have a query in sql which I want to transform in ES.
Select * from items where
(
(State=== Open AND (userId=== '123' OR contributers.include('123')))
OR
(
(State=== Review)
AND
(
AntherState=== Submitted AND AND (userId=== '123' OR contributers.include('123')))
OR
AntherState=== Submitted AND Type = 1)
OR
AntherState === Accepted AND reviewer === '123'
)
)
OR
(
(State=== Submitted OR State=== Closed ) AND ( lastupdated = last 7 days )
)
)
Any help will be appreciated.