Skip to content

Commit

Permalink
remove unneeded method
Browse files Browse the repository at this point in the history
  • Loading branch information
brwe committed Aug 28, 2014
1 parent 2af2bf2 commit bfd4f47
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
Expand Up @@ -434,13 +434,6 @@ private void removeObjectAndFieldMappers(DocumentMapper docMapper) {
}
}

/**
* Just parses and returns the mapper without adding it, while still applying default mapping.
*/
public DocumentMapper parse(String mappingType, CompressedString mappingSource) throws MapperParsingException {
return parse(mappingType, mappingSource, true);
}

public DocumentMapper parse(String mappingType, CompressedString mappingSource, boolean applyDefault) throws MapperParsingException {
String defaultMappingSource;
if (PercolatorService.TYPE_NAME.equals(mappingType)) {
Expand Down
Expand Up @@ -115,10 +115,10 @@ protected void testConflictWhileMergingAndMappingUnchanged(XContentBuilder mappi
public void testSizeTimestampParsing() throws IOException {
IndexService indexService = createIndex("test", ImmutableSettings.settingsBuilder().build());
String mapping = copyToStringFromClasspath("/org/elasticsearch/index/mapper/update/default_mapping_with_disabled_size_timestamp.json");
DocumentMapper documentMapper = indexService.mapperService().parse("type", new CompressedString(mapping));
DocumentMapper documentMapper = indexService.mapperService().parse("type", new CompressedString(mapping), true);
assertThat(documentMapper.mappingSource().string(), equalTo(mapping));
documentMapper.refreshSource(); //should be called anyway somewhere but just to be sure
documentMapper = indexService.mapperService().parse("type", new CompressedString(documentMapper.mappingSource().string()));
documentMapper = indexService.mapperService().parse("type", new CompressedString(documentMapper.mappingSource().string()), true);
assertThat(documentMapper.mappingSource().string(), equalTo(mapping));
}

Expand Down

0 comments on commit bfd4f47

Please sign in to comment.