Skip to content

ReactiveElasticsearchClient should use the same request parameters as non-reactive code #1658

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

Closed
sothawo opened this issue Jan 19, 2021 · 4 comments · Fixed by #1703
Closed
Labels
type: enhancement A general enhancement

Comments

@sothawo
Copy link
Collaborator

sothawo commented Jan 19, 2021

Currently the ReactiveElasticsearchClient uses old request classes for these operations:

  • create index
  • get index
  • put mapping
  • get mapping

We should add variants that accept the same request classes as Elasticsearch's RestHighlevelClient and deprecate the existing ones for later removal.

@ffaoudi
Copy link
Contributor

ffaoudi commented Jan 26, 2021

Hy @sothawo i would like to propose a PR for this issue. I have question about naming, in ReactiveElasticsearchClient, the new default method default Mono<Boolean> createIndex(Consumer<org.elasticsearch.client.indices.CreateIndexRequest> consumer) will clash with existing method default Mono<Boolean> createIndex(Consumer<CreateIndexRequest> consumer), please can provide me a suggestion about naming the new method?

@sothawo
Copy link
Collaborator Author

sothawo commented Jan 26, 2021

skip the new one. Once the existing and then deprecated method is removed we can reintroduce the Consumer based method with the new parameter.

@gaborkr
Copy link

gaborkr commented Feb 15, 2021

Is there any workaround for this other than using the non-reactive client for index-related operations?

(Using the old .admin based classes eg. org.elasticsearch.action.admin.indices.create.CreateIndexRequest (also included in DefaultReactiveIndexOperations) doesn't work on ES 7.x (7.10.1 for sure) - so I would classify this as a bugfix and not an "enhancement"... as I found out while migrating from an older Spring Data / ES client version.)

@sothawo
Copy link
Collaborator Author

sothawo commented Feb 15, 2021

Adapting this changes the API of ReactiveElasticsearchClient, thus it is an enhancement and not a bugfix. This issue is worked upon and will be addressed.

Don't forget that Spring Data Elasticsearch is a community maintained project, there is no one working full time on this - and probably not in her payed working time.

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
3 participants