Hisoka-X commented on code in PR #6425:
URL: https://github.com/apache/seatunnel/pull/6425#discussion_r1560664713


##########
docs/en/connector-v2/source/Elasticsearch.md:
##########
@@ -58,7 +57,7 @@ Elasticsearch index name, support * fuzzy matching.
 
 The fields of index.
 You can get the document id by specifying the field `_id`.If sink _id to other 
index,you need specify an alias for _id due to the Elasticsearch limit.
-If you don't config source, you must config `schema`.
+If you don't config source, It is automatically retrieved from the mapping of 
the index.

Review Comment:
   ```suggestion
   If you don't config source, it is automatically retrieved from the mapping 
of the index.
   ```



##########
seatunnel-connectors-v2/connector-elasticsearch/src/main/java/org/apache/seatunnel/connectors/seatunnel/elasticsearch/source/ElasticsearchSource.java:
##########
@@ -59,21 +68,20 @@ public ElasticsearchSource(ReadonlyConfig config) {
         this.config = config;
         if (config.getOptional(TableSchemaOptions.SCHEMA).isPresent()) {
             // todo: We need to remove the schema in ES.
+            log.warn("the schema in ES Deprecated,please use source instead!");

Review Comment:
   ```suggestion
               log.warn("The schema config in ElasticSearch sink is deprecated, 
please use source config instead!");
   ```



##########
seatunnel-e2e/seatunnel-connector-v2-e2e/connector-elasticsearch-e2e/src/test/java/org/apache/seatunnel/e2e/connector/elasticsearch/ElasticsearchIT.java:
##########
@@ -227,6 +241,14 @@ private List<String> generateTestDataSet() throws 
JsonProcessingException {
         return documents;
     }
 
+    private List<String> readSinkDataWithOutSchema() throws 
InterruptedException {
+        Map<String, BasicTypeDefine<EsType>> esFieldType =
+                esRestClient.getFieldTypeMapping("st_index2", 
Lists.newArrayList());

Review Comment:
   ```suggestion
                   esRestClient.getFieldTypeMapping("st_index4", 
Lists.newArrayList());
   ```



-- 
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: [email protected]

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

Reply via email to