wuyunfeng commented on a change in pull request #3305: Add field context for 
string field keyword type
URL: https://github.com/apache/incubator-doris/pull/3305#discussion_r407499089
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/external/EsStateStore.java
 ##########
 @@ -209,36 +206,54 @@ public EsTableState parseClusterState55(String 
responseStr, EsTable esTable)
                 }
                 JSONObject fieldObject = schema.optJSONObject(colName);
                 String fieldType = fieldObject.optString("type");
-                if 
(EsTable.DEFAULT_DOCVALUE_DISABLED_FIELDS.contains(fieldType)) {
-                    JSONObject fieldsObject = 
fieldObject.optJSONObject("fields");
-                    if (fieldsObject != null) {
-                        for (String key : fieldsObject.keySet()) {
-                            JSONObject innerTypeObject = 
fieldsObject.optJSONObject(key);
-                            if 
(EsTable.DEFAULT_DOCVALUE_DISABLED_FIELDS.contains(innerTypeObject.optString("type")))
 {
-                                continue;
-                            }
-                            if (innerTypeObject.has("doc_values")) {
-                                boolean docValue = 
innerTypeObject.getBoolean("doc_values");
-                                if (docValue) {
-                                    esTable.addDocValueField(colName, colName);
+                // 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)) {
 
 Review comment:
   Elasticsearch's type must be lowercase...

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to