SQL Query with "NOT IN" keyword replacement in ES

(Waseem Anjum) #1

I need to filter results from my indices based on this scenario:
Select * from TblName where status='ERROR' not in (select * from TbleName where status='OK' )

I am unable to get desired results using must, must not etc.

(Waseem Anjum) #2

I guess nobody understood the question?


you must prepare query like

select * FROM TblName where status NOT IN('OK','OK1')

(Waseem Anjum) #4

Sorry I didn't got your logic. Can you please elaborate a little. :frowning:

(Christian Dahlqvist) #5

As far as I know, Elasticsearch SQL does not support sub-selects.

(Waseem Anjum) #6

It doesn't matter its SQL or elastic search query. I need a solution for this logic:
ES Logic

(system) closed #8

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