Skip to content

Feature/reindex support 321#414

Draft
ljluestc wants to merge 2 commits intogo-mysql-org:masterfrom
ljluestc:feature/reindex-support-321
Draft

Feature/reindex support 321#414
ljluestc wants to merge 2 commits intogo-mysql-org:masterfrom
ljluestc:feature/reindex-support-321

Conversation

@ljluestc
Copy link

We expose the Elasticsearch _reindex API via a new HTTP endpoint on the status server. This allows for triggering manual reindexing operations directly.

Usage

To trigger a reindex, send a POST request to the /reindex endpoint of the status server (default port 12800). The body of the request should contain the standard Elasticsearch reindex JSON payload.

Example

curl -X POST http://127.0.0.1:12800/reindex -d '{
  "source": {
    "index": "old_index"
  },
  "dest": {
    "index": "new_index"
  }
}'

Implementation Details

The implementation involves:

  • Elasticsearch Client: A Reindex method has been added to the internal client.
  • HTTP Handler: A new handler /reindex accepts JSON requests and proxies them to the Elasticsearch _reindex API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant