jillesvangurp / kt-search

Multi platform kotlin client for Elasticsearch & Opensearch with easily extendable Kotlin DSLs for queries, mappings, bulk, and more.
MIT License
95 stars 23 forks source link

Add support for reindex operation #99

Closed barbulescu closed 6 months ago

barbulescu commented 6 months ago

Am I on the right path?

Any feedback is welcomed.

barbulescu commented 6 months ago

@jillesvangurp I see that queries are extension functions on SearchDSL - how can I reuse them for ReindexDSL?

jillesvangurp commented 6 months ago

@jillesvangurp I see that queries are extension functions on SearchDSL - how can I reuse them for ReindexDSL?

Maybe introduce a shared interface for the extension functions that you want to reuse and implement that both on SearchDSL and ReindexDSL? This might be needed elsewhere as well as there are more APIs that accept part of the search DSL.

barbulescu commented 6 months ago

What do you think about merging this PR and introducing QueryDSL interface in a different PR?

reindex is marked for now as experimental until major aspects are implemented: query, remote, async, ...

I would like to have a PR for each major topic.

jillesvangurp commented 6 months ago

@barbulescu good idea; I just merged it. Thanks for this.

jillesvangurp commented 6 months ago

What do you think about merging this PR and introducing QueryDSL interface in a different PR?

reindex is marked for now as experimental until major aspects are implemented: query, remote, async, ...

I would like to have a PR for each major topic.

Have a look at deleteByQuery, it accepts a SearchDSL block. That might work for this as well.