apache/seatunnel · warning

fail to get easysearch field

Error message

fail to get easysearch field {} mapping type,so give a default type text

What it means

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.

Solutions

  1. Check the actual index mapping (`GET /index/_mapping`) and correct the field name in the connector config's `columns` list.
  2. If the field is genuinely unmapped, accept the `text` fallback or add an explicit mapping for the field in Easysearch and reindex.
  3. Use the fully-qualified path for nested fields (e.g. `a.b.c`) in the columns list.
  4. Verify the configured `index` points to the intended index/alias with a consistent mapping.

Example fix

// before
columns = ["id", "mesage"]   // typo, falls back to text
// after
columns = ["id", "message"]  // matches mapping field type keyword/long
Defensive patterns

Strategy: validation

Validate before calling

// before configuring columns, verify against the mapping:
// GET /<index>/_mapping  -> ensure every configured column exists
Set<String> mapped = mappingFields.keySet();
if (!mapped.containsAll(configuredColumns)) {
    throw new IllegalArgumentException("Unknown columns: " + minus(configuredColumns, mapped));
}

Prevention

When it happens

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

Common situations: 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.

Understand the failure class

Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.

Related errors


AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10). Data as JSON: /api/errors/d944bdf7e7c40df0. Report an issue: GitHub.

Appendix: source

Thrown at seatunnel-connectors-v2/connector-easysearch/src/main/java/org/apache/seatunnel/connectors/seatunnel/easysearch/client/EasysearchClient.java:224

                            String fieldName = entry.getKey();
                            JsonNode fieldProperty = entry.getValue();
                            if (fieldProperty.has("type")) {
                                allEasysearchFieldTypeInfoMap.put(
                                        fieldName, fieldProperty.get("type").asText());
                            }
                        });
        if (CollectionUtils.isEmpty(source)) {
            return allEasysearchFieldTypeInfoMap;
        }

        return source.stream()
                .collect(
                        Collectors.toMap(
                                Function.identity(),
                                fieldName -> {
                                    String fieldType = allEasysearchFieldTypeInfoMap.get(fieldName);
                                    if (fieldType == null) {
                                        log.warn(
                                                "fail to get easysearch field {} mapping type,so give a default type text",
                                                fieldName);
                                        return "text";
                                    }
                                    return fieldType;
                                }));
    }

    public BulkResponse bulk(String requestBody) {
        Request request = new Request("POST", "/_bulk");
        request.setJsonEntity(requestBody);
        try {
            Response response = restClient.performRequest(request);
            if (response == null) {
                throw new EasysearchConnectorException(
                        EasysearchConnectorErrorCode.BULK_RESPONSE_ERROR,
                        "bulk ezs Response is null");
            }

View on GitHub (pinned to cf67b549a7)