diff options
Diffstat (limited to 'core/src/main/java/org/elasticsearch/action/index/TransportIndexAction.java')
-rw-r--r-- | core/src/main/java/org/elasticsearch/action/index/TransportIndexAction.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/src/main/java/org/elasticsearch/action/index/TransportIndexAction.java b/core/src/main/java/org/elasticsearch/action/index/TransportIndexAction.java index 4ae522d29c..ae901e8575 100644 --- a/core/src/main/java/org/elasticsearch/action/index/TransportIndexAction.java +++ b/core/src/main/java/org/elasticsearch/action/index/TransportIndexAction.java @@ -146,7 +146,7 @@ public class TransportIndexAction extends TransportReplicationAction<IndexReques MappingMetaData mappingMd = indexMetaData.mappingOrDefault(request.type()); if (mappingMd != null && mappingMd.routing().required()) { if (request.routing() == null) { - throw new RoutingMissingException(request.shardId().getIndex(), request.type(), request.id()); + throw new RoutingMissingException(request.shardId().getIndex().getName(), request.type(), request.id()); } } @@ -176,7 +176,7 @@ public class TransportIndexAction extends TransportReplicationAction<IndexReques */ public static Engine.Index executeIndexRequestOnReplica(IndexRequest request, IndexShard indexShard) { final ShardId shardId = indexShard.shardId(); - SourceToParse sourceToParse = SourceToParse.source(SourceToParse.Origin.REPLICA, request.source()).index(shardId.getIndex()).type(request.type()).id(request.id()) + SourceToParse sourceToParse = SourceToParse.source(SourceToParse.Origin.REPLICA, request.source()).index(shardId.getIndexName()).type(request.type()).id(request.id()) .routing(request.routing()).parent(request.parent()).timestamp(request.timestamp()).ttl(request.ttl()); final Engine.Index operation = indexShard.prepareIndexOnReplica(sourceToParse, request.version(), request.versionType()); @@ -204,7 +204,7 @@ public class TransportIndexAction extends TransportReplicationAction<IndexReques Mapping update = operation.parsedDoc().dynamicMappingsUpdate(); final ShardId shardId = indexShard.shardId(); if (update != null) { - final String indexName = shardId.getIndex(); + final String indexName = shardId.getIndexName(); mappingUpdatedAction.updateMappingOnMasterSynchronously(indexName, request.type(), update); operation = prepareIndexOperationOnPrimary(request, indexShard); update = operation.parsedDoc().dynamicMappingsUpdate(); |