Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spring-data-elasticsearch doesn't support elasticsearch sql #2683

Open
zzy444626905 opened this issue Aug 31, 2023 · 4 comments
Open

spring-data-elasticsearch doesn't support elasticsearch sql #2683

zzy444626905 opened this issue Aug 31, 2023 · 4 comments
Labels
type: enhancement A general enhancement

Comments

@zzy444626905
Copy link

elasticsearch sql like this:

select count(1) from "indexPrefix*"

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Aug 31, 2023
@sothawo
Copy link
Collaborator

sothawo commented Aug 31, 2023

That's right, would need to check if the Elasticsearch Java client supports this.

@sothawo
Copy link
Collaborator

sothawo commented Sep 3, 2023

ok, the Java client has a co.elastic.clients.elasticsearch.sql.ElasticsearchSqlClient, so support for this could be implemented.

@sothawo sothawo added type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels Sep 3, 2023
@zzy444626905
Copy link
Author

ok, the Java client has a co.elastic.clients.elasticsearch.sql.ElasticsearchSqlClient, so support for this could be implemented.

Thank big boss for supporting for this, make me stand on the shoulders of giants.

@sothawo
Copy link
Collaborator

sothawo commented Nov 14, 2023

I had a deeper look today. Althoug integrating the query part is quite easy, it is way harder to find a good way to parse the response returned from an Elasticsearch SQL query into the entities that Spring Data Elasticsearch uses.

For the time being, I wrote a short post (https://www.sothawo.com/post/2023/11/14/use-elasticsearch-sql-with-spring-data-elasticsearch/) about this can currently be integrated int an application, but you need to do the response processing by yourself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

3 participants