You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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.
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.
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.
The text was updated successfully, but these errors were encountered: