',' can be used in type name, closes #996.

This commit is contained in:
kimchy 2011-06-04 01:26:41 +03:00
parent 5fbb4f7043
commit dcd2bbd9a9
1 changed files with 3 additions and 0 deletions

View File

@ -171,6 +171,9 @@ public class MapperService extends AbstractIndexComponent implements Iterable<Do
if (mapper.type().contains("#")) { if (mapper.type().contains("#")) {
throw new InvalidTypeNameException("mapping type name [" + mapper.type() + "] should not include '#' in it"); throw new InvalidTypeNameException("mapping type name [" + mapper.type() + "] should not include '#' in it");
} }
if (mapper.type().contains(",")) {
throw new InvalidTypeNameException("mapping type name [" + mapper.type() + "] should not include ',' in it");
}
if (mapper.type().contains(".")) { if (mapper.type().contains(".")) {
logger.warn("Type [{}] contains a '.', it is recommended not to include it within a type name", mapper.type()); logger.warn("Type [{}] contains a '.', it is recommended not to include it within a type name", mapper.type());
} }