Authored by Gino Zhang

修改multi-fields的问题

... ... @@ -580,6 +580,11 @@ public class SearchExplainerService {
parseSingle(fieldDescMap, realFieldName, (Map<String, Object>) innerFieldsMap.get(innerField));
}
if(!innerFieldsMap.containsKey(field)){
// ES的mapping是平铺的 所以相同名字的不在fields里面
parseSingle(fieldDescMap, field, fieldPropMap);
}
} else if (fieldPropMap.containsKey("properties")) {
// nested object类型 搜索暂不支持查询内嵌对象的字段
} else {
... ... @@ -594,6 +599,7 @@ public class SearchExplainerService {
fieldDesc.index = (String) fieldPropMap.get("index");
fieldDesc.analyzer = (String) fieldPropMap.get("analyzer");
fieldDesc.search_analyzer = (String) fieldPropMap.get("search_analyzer");
Object copyTo = fieldPropMap.get("copy_to");
if (copyTo != null && copyTo instanceof List) {
List<String> copyToFields = (List<String>) copyTo;
... ...