elasticsearch-reindex icon indicating copy to clipboard operation
elasticsearch-reindex copied to clipboard

Provide some info about the reindex process whether is successful or erroneous in the response

Open JoeZ99 opened this issue 11 years ago • 0 comments

currently, the response is a simple 200 OK status response. with no info whatsoever of what just happened.

it could carry info about how many items were reindexed, the size, etc ...

also, in some cases that exceptions are thrown, the response is a 200 status one.

for example, when trying to reindex to a "_" prefixed type , the following exception is obtained

org.elasticsearch.indices.InvalidTypeNameException: mapping type name [_xx] can't start with '_'
        at org.elasticsearch.index.mapper.MapperService.merge(MapperService.java:212)
        at org.elasticsearch.index.mapper.MapperService.merge(MapperService.java:200)
        at org.elasticsearch.index.mapper.MapperService.documentMapperWithAutoCreate(MapperService.java:351)
        at org.elasticsearch.index.shard.service.InternalIndexShard.prepareIndex(InternalIndexShard.java:373)
        at org.elasticsearch.action.bulk.TransportShardBulkAction.shardIndexOperation(TransportShardBulkAction.java:397)
        at org.elasticsearch.action.bulk.TransportShardBulkAction.shardOperationOnPrimary(TransportShardBulkAction.java:156)
        at org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction.performOnPrimary(TransportShardReplicationOperationAction.java:556)
        at org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction$1.run(TransportShardReplicationOperationAction.java:426)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:679)

but the response has 200 status code.

I know I could just do it, but , to my shame, I'm no java coder ;-(

JoeZ99 avatar Feb 24 '14 18:02 JoeZ99