{"record":{"id":"d944bdf7e7c40df0","repo":"apache/seatunnel","slug":"fail-to-get-easysearch-field-mapping-type-so-gi","errorCode":null,"errorMessage":"fail to get easysearch field {} mapping type,so give a default type text","messagePattern":"fail to get easysearch field (.+?) mapping type,so give a default type text","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"seatunnel-connectors-v2/connector-easysearch/src/main/java/org/apache/seatunnel/connectors/seatunnel/easysearch/client/EasysearchClient.java","lineNumber":224,"sourceCode":"                            String fieldName = entry.getKey();\n                            JsonNode fieldProperty = entry.getValue();\n                            if (fieldProperty.has(\"type\")) {\n                                allEasysearchFieldTypeInfoMap.put(\n                                        fieldName, fieldProperty.get(\"type\").asText());\n                            }\n                        });\n        if (CollectionUtils.isEmpty(source)) {\n            return allEasysearchFieldTypeInfoMap;\n        }\n\n        return source.stream()\n                .collect(\n                        Collectors.toMap(\n                                Function.identity(),\n                                fieldName -> {\n                                    String fieldType = allEasysearchFieldTypeInfoMap.get(fieldName);\n                                    if (fieldType == null) {\n                                        log.warn(\n                                                \"fail to get easysearch field {} mapping type,so give a default type text\",\n                                                fieldName);\n                                        return \"text\";\n                                    }\n                                    return fieldType;\n                                }));\n    }\n\n    public BulkResponse bulk(String requestBody) {\n        Request request = new Request(\"POST\", \"/_bulk\");\n        request.setJsonEntity(requestBody);\n        try {\n            Response response = restClient.performRequest(request);\n            if (response == null) {\n                throw new EasysearchConnectorException(\n                        EasysearchConnectorErrorCode.BULK_RESPONSE_ERROR,\n                        \"bulk ezs Response is null\");\n            }","sourceCodeStart":206,"sourceCodeEnd":242,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-easysearch/src/main/java/org/apache/seatunnel/connectors/seatunnel/easysearch/client/EasysearchClient.java#L206-L242","documentation":"A WARN logged by EasysearchClient.getFieldTypeMappingFromProperties when a requested field has no mapping type in the Easysearch index mapping. The reader falls back to mapping the field as SeaTunnel TEXT type so ingestion continues, at the cost of possibly wrong typing.","triggerScenarios":"Calling getFieldTypeMapping for a column list where at least one field name is absent from the index's field type map — e.g. the field is only in _source but not mapped, is a nested/multi-field with a different full path, or the catalog was built from a different index.","commonSituations":"Typos in the configured `columns`; querying an index alias whose backing mapping differs; dynamic-mapped fields not present in the mapping response; index pattern (wildcard) matching indices with heterogeneous mappings.","solutions":["Check the actual index mapping (`GET /index/_mapping`) and correct the field name in the connector config's `columns` list.","If the field is genuinely unmapped, accept the `text` fallback or add an explicit mapping for the field in Easysearch and reindex.","Use the fully-qualified path for nested fields (e.g. `a.b.c`) in the columns list.","Verify the configured `index` points to the intended index/alias with a consistent mapping."],"exampleFix":"// before\ncolumns = [\"id\", \"mesage\"]   // typo, falls back to text\n// after\ncolumns = [\"id\", \"message\"]  // matches mapping field type keyword/long","handlingStrategy":"validation","validationCode":"// before configuring columns, verify against the mapping:\n// GET /<index>/_mapping  -> ensure every configured column exists\nSet<String> mapped = mappingFields.keySet();\nif (!mapped.containsAll(configuredColumns)) {\n    throw new IllegalArgumentException(\"Unknown columns: \" + minus(configuredColumns, mapped));\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Copy column names directly from the index mapping","Avoid wildcard index patterns with heterogeneous mappings","Use fully-qualified paths for nested fields"],"tags":["elasticsearch-like","mapping","fallback","schema"],"backgroundTag":"empty-result-set","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}