You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2020/02/19 02:54:44 UTC

[GitHub] [calcite] jerryleooo commented on a change in pull request #1813: [CALCITE-3802] Fix elasticsearch fetch mapping

jerryleooo commented on a change in pull request #1813: [CALCITE-3802] Fix elasticsearch fetch mapping
URL: https://github.com/apache/calcite/pull/1813#discussion_r381052278
 
 

 ##########
 File path: elasticsearch/src/main/java/org/apache/calcite/adapter/elasticsearch/ElasticsearchTransport.java
 ##########
 @@ -118,7 +120,14 @@ private ElasticsearchVersion version() {
    * Build index mapping returning new instance of {@link ElasticsearchMapping}.
    */
   private ElasticsearchMapping fetchAndCreateMapping() {
-    final String uri = String.format(Locale.ROOT, "/%s/_mapping", indexName);
+    String encodedIndexName = indexName;
+    try {
+      encodedIndexName = URLEncoder.encode(indexName, StandardCharsets.UTF_8.toString());
+    } catch (Exception e) {
 
 Review comment:
   Good idea, will see how to implement.

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