From 9af288a42f820df5a768634f230c7aca00a3c743 Mon Sep 17 00:00:00 2001 From: kimchy Date: Thu, 29 Jul 2010 19:22:21 +0300 Subject: [PATCH] fix test for existance of directory based mappings when creating an index --- .../cluster/metadata/MetaDataCreateIndexService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/metadata/MetaDataCreateIndexService.java b/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/metadata/MetaDataCreateIndexService.java index e09b4dd8188..e815157cfa7 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/metadata/MetaDataCreateIndexService.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/metadata/MetaDataCreateIndexService.java @@ -127,11 +127,11 @@ public class MetaDataCreateIndexService extends AbstractComponent { File mappingsDir = new File(environment.configFile(), "mappings"); if (mappingsDir.exists() && mappingsDir.isDirectory()) { File defaultMappingsDir = new File(mappingsDir, "_default"); - if (mappingsDir.exists() && mappingsDir.isDirectory()) { + if (defaultMappingsDir.exists() && defaultMappingsDir.isDirectory()) { addMappings(mappings, defaultMappingsDir); } File indexMappingsDir = new File(mappingsDir, request.index); - if (mappingsDir.exists() && mappingsDir.isDirectory()) { + if (indexMappingsDir.exists() && indexMappingsDir.isDirectory()) { addMappings(mappings, indexMappingsDir); } }