Convert SQL join queries to DSL

Greetings all,

I was just wondering if it is possible to convert SQL join queries to their DSL equivalent? Formerly in OpenDistro 1.9, query explanation used to return the DSL equivalent. Later versions however stopped doing that. Any advice?

One key thing about DSL and (_search) is that I can mix search, agg and highlight all in one request. I am not sure if that is possible in SQL.

Thanks

1 Like

SQL is not just a simple DSL translation; there may be edgecases based on your grammar usage. Its a bit more involved to do a simple translation. you can try Explain using the Query Workbench feature. Query Workbench - OpenSearch documentation

Could you please open an issue in SQL repository to add support for highlight and other features you want; we can prioritize that work accordingly

Thanks @anirudha, I was under the impression that SQL is just another syntax for DSL. I will open an issue for SQL.

Regards,
Hasan