fix test for existance of directory based mappings when creating an index

This commit is contained in:
kimchy 2010-07-29 19:22:21 +03:00
parent 0186a03684
commit 9af288a42f
1 changed files with 2 additions and 2 deletions

View File

@ -127,11 +127,11 @@ public class MetaDataCreateIndexService extends AbstractComponent {
File mappingsDir = new File(environment.configFile(), "mappings"); File mappingsDir = new File(environment.configFile(), "mappings");
if (mappingsDir.exists() && mappingsDir.isDirectory()) { if (mappingsDir.exists() && mappingsDir.isDirectory()) {
File defaultMappingsDir = new File(mappingsDir, "_default"); File defaultMappingsDir = new File(mappingsDir, "_default");
if (mappingsDir.exists() && mappingsDir.isDirectory()) { if (defaultMappingsDir.exists() && defaultMappingsDir.isDirectory()) {
addMappings(mappings, defaultMappingsDir); addMappings(mappings, defaultMappingsDir);
} }
File indexMappingsDir = new File(mappingsDir, request.index); File indexMappingsDir = new File(mappingsDir, request.index);
if (mappingsDir.exists() && mappingsDir.isDirectory()) { if (indexMappingsDir.exists() && indexMappingsDir.isDirectory()) {
addMappings(mappings, indexMappingsDir); addMappings(mappings, indexMappingsDir);
} }
} }