Skip to content

Commit 5790335

Browse files
committed
Fix SearchWhileRelocatingIT so that the type of the mapping matches the type of documents.
1 parent a27c53f commit 5790335

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

core/src/main/java/org/elasticsearch/index/mapper/MapperService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ protected void checkMappersCompatibility(String type, Collection<ObjectMapper> o
392392

393393
for (FieldMapper fieldMapper : fieldMappers) {
394394
if (fullPathObjectMappers.containsKey(fieldMapper.name())) {
395-
throw new IllegalArgumentException("Field [{}] is defined as a field in mapping [" + fieldMapper.name() + "] but this name is already used for an object in other types");
395+
throw new IllegalArgumentException("Field [" + fieldMapper.name() + "] is defined as a field in mapping [" + type + "] but this name is already used for an object in other types");
396396
}
397397
}
398398

core/src/test/java/org/elasticsearch/search/basic/SearchWhileRelocatingIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ private void testSearchAndRelocateConcurrently(final int numberOfReplicas) throw
6666
final int numShards = between(1, 20);
6767
client().admin().indices().prepareCreate("test")
6868
.setSettings(settingsBuilder().put("index.number_of_shards", numShards).put("index.number_of_replicas", numberOfReplicas))
69-
.addMapping("type1", "loc", "type=geo_point", "test", "type=string").execute().actionGet();
69+
.addMapping("type", "loc", "type=geo_point", "test", "type=string").execute().actionGet();
7070
ensureGreen();
7171
List<IndexRequestBuilder> indexBuilders = new ArrayList<>();
7272
final int numDocs = between(10, 20);

0 commit comments

Comments
 (0)