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

Allow providing pipeline on simple save and/or on repository #3015

Open
CezaryStasiak opened this issue Nov 29, 2024 · 2 comments
Open

Allow providing pipeline on simple save and/or on repository #3015

CezaryStasiak opened this issue Nov 29, 2024 · 2 comments
Labels
type: enhancement A general enhancement

Comments

@CezaryStasiak
Copy link

CezaryStasiak commented Nov 29, 2024

Elastic allows to pass pipeline name on save request (https://www.elastic.co/guide/en/elasticsearch/reference/current/ingest.html#add-pipeline-to-indexing-request). It would be nice to have this ability with spring data. Extended .save() with another parameter or @ Pipeline annotation for index class so it would work for all saved documents for given index.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Nov 29, 2024
@CezaryStasiak CezaryStasiak changed the title Allow providing pipeline on simple save and/or repository Allow providing pipeline on simple save and/or on repository Nov 29, 2024
@CezaryStasiak
Copy link
Author

Given that IndexCoordinates looks like a place that deals with url parts it could be extended with pipeline . Then in ElasticsearchRepository:
<S extends T> S save(S entity, @Nullable IndexCoordinates indexCoordinates);
and handling that at the end in documentIndexRequest (RequestConverter)
if (indexCoordinates.getPipeline != null) { builder.pipeline(indexCoordinates.getPipeline()); }

Of course I have no idea if thats a good place for it.

@sothawo
Copy link
Collaborator

sothawo commented Dec 4, 2024

IndexCoordinates has nothing to do with URL parts, it's a collection of index names. Adding information lioke a pipeline name there would only enable it for methods that use one of the API calls that use IndexCoordinates. Don't know yet where the best place for this information is.

@sothawo sothawo added the type: enhancement A general enhancement label Dec 4, 2024
@sothawo sothawo removed the status: waiting-for-triage An issue we've not yet triaged label Dec 14, 2024
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