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 2022/12/02 09:12:10 UTC

[GitHub] [doris] qidaye opened a new issue, #14761: [Bug] DOE query error when index mapping has dynamic_template

qidaye opened a new issue, #14761:
URL: https://github.com/apache/doris/issues/14761

   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no similar issues.
   
   
   ### Version
   
   12791f1c79adfce78fa5df2c99e6ce0257f618a6
   
   ### What's Wrong?
   
   ES external table dose not query normally.
   
   ### What You Expected?
   
   Query normally.
   
   ### How to Reproduce?
   
   1. create ES index 
   ```json
   curl -X PUT "localhost:9201/test?pretty" -H 'Content-Type: application/json' -d'
   {
     "mappings": {
         "dynamic_templates" : [
           {
             "message_full" : {
               "match" : "message_full",
               "mapping" : {
                 "fields" : {
                   "keyword" : {
                     "ignore_above" : 2048,
                     "type" : "keyword"
                   }
                 },
                 "type" : "text"
               }
             }
           },
           {
             "message" : {
               "match" : "message",
               "mapping" : {
                 "type" : "text"
               }
             }
           },
           {
             "strings" : {
               "match_mapping_type" : "string",
               "mapping" : {
                 "type" : "keyword"
               }
             }
           }
         ], 
         "properties": { 
           "title":    { "type": "text" ,"fields": {
             "keyword": {
             "ignore_above": 256,
             "type": "keyword"
             }
             } }, 
           "name":     { "type": "text"  }, 
           "age":      { "type": "integer" }
         }
       
     }
   }
   '
   ```
   2. create Doris ES external table
   ```sql
   CREATE EXTERNAL TABLE `es` (
   `name` varchar(20) COMMENT "",
   `age` varchar(20) COMMENT ""
   ) ENGINE=ELASTICSEARCH
   PROPERTIES (
   "hosts" = "http://localhost:9201",
   "index" = "test"
   );
   ```
   3. query es table
   4. get error
   ```
   ERROR 1105 (HY000): errCode = 2, detailMessage = fetch es table [es] metadata failure: org.json.simple.JSONArray cannot be cast to org.json.simple.JSONObject
   ```
   
   ### Anything Else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] yiguolei closed issue #14761: [Bug] DOE query error when index mapping has dynamic_template

Posted by GitBox <gi...@apache.org>.
yiguolei closed issue #14761: [Bug] DOE query error when index mapping has dynamic_template
URL: https://github.com/apache/doris/issues/14761


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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