improve failure when disabling dynamic creating of types, and trying to index into a non existing type

This commit is contained in:
kimchy 2011-03-02 20:42:43 +02:00
parent faefc772a4
commit 655cbb9440

View File

@ -223,7 +223,7 @@ public class MapperService extends AbstractIndexComponent implements Iterable<Do
return mapper; return mapper;
} }
if (!dynamic) { if (!dynamic) {
return null; throw new TypeMissingException(index, type, "typing to auto create mapping, but dynamic mapping is disabled");
} }
// go ahead and dynamically create it // go ahead and dynamically create it
synchronized (mutex) { synchronized (mutex) {