You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2020/04/13 13:42:06 UTC

[GitHub] [incubator-doris] imay commented on a change in pull request #3305: Add field context for string field keyword type

imay 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_r407482433
 
 

 ##########
 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:
   
   ignorecase compare?

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


With regards,
Apache Git Services

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