opensearch-project / OpenSearch

🔎 Open source distributed and RESTful search engine.
https://opensearch.org/docs/latest/opensearch/index/
Apache License 2.0
9.79k stars 1.82k forks source link

Support GraphQL natively in Opensearch #2443

Open sandervandegeijn opened 2 years ago

sandervandegeijn commented 2 years ago

Is your feature request related to a problem? Please describe. The Elasticsearch REST is API can be cumbersome. GraphQL is a widely used query language that is supported by many tools. It could be beneficial to support this out of the box to improve the interoperability of opensearch. There is a solution to provide this as an add on to Elasticsearch but I haven't found it for Opensearch.

Describe the solution you'd like Implement GraphQL

Describe alternatives you've considered Using the REST api and looking into addons, haven't found any (Elasticsearch https://www.npmjs.com/package/graphql-compose-elasticsearch)

Additional context Add any other context or screenshots about the feature request here.

dblock commented 2 years ago

Have you tried using graphql-compose-elasticsearch? It might "just work" against 1.x of OpenSearch. If not, maybe open an issue in https://github.com/graphql-compose/graphql-compose-elasticsearch to support OpenSearch? Or that project needs to be forked into graphql-compose-opensearch?

I love GraphQL and love this idea, but I think it doesn't belong in OpenSearch engine because it's another API for the same purposes. But I can definitely see it as a plugin. WDYT?

sandervandegeijn commented 2 years ago

From what I've seen that one is using the official elastic js client. I'm not going to bet on that one, Elastic is breaking everything that could work with opensearch or the older elastic-oss versions deliberately...