stalary commented on a change in pull request #3454:
URL: https://github.com/apache/incubator-doris/pull/3454#discussion_r427005431



##########
File path: fe/src/main/java/org/apache/doris/external/EsStateStore.java
##########
@@ -192,77 +141,75 @@ public EsTableState parseClusterState55(String 
responseStr, EsTable esTable)
         //    }
         // then the docvalue context provided the mapping between the select 
field and real request field :
         // {"city": "city.raw"}
-        JSONObject indicesMetaMap = 
jsonObject.getJSONObject("metadata").getJSONObject("indices");
-        JSONObject indexMetaMap = 
indicesMetaMap.optJSONObject(esTable.getIndexName());
-        if (indexMetaMap != null && (esTable.isKeywordSniffEnable() || 
esTable.isDocValueScanEnable())) {
-            JSONObject mappings = indexMetaMap.optJSONObject("mappings");
-            JSONObject rootSchema = 
mappings.optJSONObject(esTable.getMappingType());
-            JSONObject schema = rootSchema.optJSONObject("properties");
-            List<Column> colList = esTable.getFullSchema();
-            for (Column col : colList) {
-                String colName = col.getName();
-                if (!schema.has(colName)) {
-                    continue;
-                }
-                JSONObject fieldObject = schema.optJSONObject(colName);
-                String fieldType = fieldObject.optString("type");
-                // string-type field used keyword type to generate predicate
-                if (esTable.isKeywordSniffEnable()) {
-                    // if text field type seen, we should use the `field` 
keyword type?
-                    if ("text".equals(fieldType)) {
-                        JSONObject fieldsObject = 
fieldObject.optJSONObject("fields");
-                        if (fieldsObject != null) {
-                            for (String key : fieldsObject.keySet()) {
-                                JSONObject innerTypeObject = 
fieldsObject.optJSONObject(key);
-                                // just for text type
-                                if 
("keyword".equals(innerTypeObject.optString("type"))) {
-                                    esTable.addFetchField(colName, colName + 
"." + key);
-                                }
+        List<Column> colList = esTable.getFullSchema();
+        for (Column col : colList) {
+            String colName = col.getName();
+            if (!properties.has(colName)) {
+                continue;
+            }
+            JSONObject fieldObject = properties.optJSONObject(colName);

Review comment:
       Ok, I will modify it later




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to