Authored by Gino Zhang

Merge branch 'zf_explain_skn' into test

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