Reindexing
Sometimes indices get messy. Learn how to reindex your data in CBElasticsearch.
getInstance( "Client@cbelasticsearch" )
.reindex( "oldIndex", "newIndex" );Asynchronous Reindexing
getInstance( "Client@cbelasticsearch" )
.reindex(
source = "oldIndex",
destination = "newIndex",
waitForCompletion = false
);Additional Reindex Options
getInstance( "Client@cbelasticsearch" )
.reindex(
source = {
"index": "oldIndex",
"type": "testdocs",
"query": {
"term": {
"active": true
}
}
},
destination = "newIndex"
);Transforming Documents via a Reindex Script
Handling Reindex Errors
Last updated
Was this helpful?