Search: When using `_all` for types, field name/type resolution might fail, closes #1704.
This commit is contained in:
parent
e1cca90006
commit
d8f18dd812
|
@ -456,6 +456,9 @@ public class MapperService extends AbstractIndexComponent implements Iterable<Do
|
|||
if (types == null || types.length == 0) {
|
||||
return smartNameObjectMapper(smartName);
|
||||
}
|
||||
if (types.length == 1 && types[0].equals("_all")) {
|
||||
return smartNameObjectMapper(smartName);
|
||||
}
|
||||
for (String type : types) {
|
||||
DocumentMapper possibleDocMapper = mappers.get(type);
|
||||
if (possibleDocMapper != null) {
|
||||
|
@ -586,6 +589,9 @@ public class MapperService extends AbstractIndexComponent implements Iterable<Do
|
|||
if (types == null || types.length == 0) {
|
||||
return smartName(smartName);
|
||||
}
|
||||
if (types.length == 1 && types[0].equals("_all")) {
|
||||
return smartName(smartName);
|
||||
}
|
||||
for (String type : types) {
|
||||
DocumentMapper documentMapper = mappers.get(type);
|
||||
// we found a mapper
|
||||
|
|
|
@ -275,6 +275,9 @@ public class QueryParseContext {
|
|||
if (types == null || types.length == 0) {
|
||||
return mapperService().types();
|
||||
}
|
||||
if (types.length == 1 && types[0].equals("_all")) {
|
||||
return mapperService().types();
|
||||
}
|
||||
return Arrays.asList(types);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue