Skip to content

Cannot get semantic_text field mapping with defaults when inference service does not exist #145136

Description

@Mikep86

Elasticsearch Version

9.3, 9.2

Installed Plugins

No response

Java Version

bundled

OS Version

N/A

Problem Description

If a user creates a semantic_text field that references an inference service that doesn't exist, they cannot use the get field mapping API with include_defaults to get the mapping.

Steps to Reproduce

  1. Create an index with a semantic_text field that references a nonexistent inference service
PUT test-index
{
  "mappings": {
    "properties": {
      "semantic_field": {
        "type": "semantic_text",
        "inference_id": "missing_inference_id"
      }
    }
  }
}
  1. Try to use the get field mapping API with include_defaults to get the mapping
GET /test-index/_mapping/field/semantic_field?include_defaults

The response is empty JSON:

{}

The request fails silently, with no errors returned to the user and no errors logged.

Logs (if relevant)

No response

Activity

  1. self-assigned this
    on Mar 27, 2026
  2. elasticsearchmachine commented on Mar 27, 2026

    @elasticsearchmachine
    Collaborator

    Pinging @elastic/es-search-relevance (Team:Search Relevance)

  3. Mikep86 commented on Apr 6, 2026

    @Mikep86
    ContributorAuthor

    This was fixed in 9.4 in #144236, but the bug still exists in 9.3 & 9.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

:Search Relevance/SearchCatch all for Search Relevance>bugTeam:Search RelevanceMeta label for the Search Relevance team in Elasticsearchpriority:normalA label for assessing bug priority to be used by ES engineers

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions