The source field is not searchable – How to solve this Elasticsearch exception

Opster Team

August-23, Version: 6.8-8.9

Before you dig into reading this guide, have you tried asking OpsGPT what this log means? You’ll receive a customized analysis of your log.

Try OpsGPT now for step-by-step guidance and tailored insights into your Elasticsearch operation.

Briefly, this error occurs when you try to search using the _source field in Elasticsearch. The _source field is a special field that contains the original JSON document that was indexed, but it is not searchable. To resolve this issue, you can either use the fields within the _source field for your search or enable the “store” option for specific fields in your mapping, which makes them searchable. Alternatively, you can use a script field to extract and return the data you need from the _source field.

For a complete solution to your to your search operation, try for free AutoOps for Elasticsearch & OpenSearch . With AutoOps and Opster’s proactive support, you don’t have to worry about your search operation – we take charge of it. Get improved performance & stability with less hardware.

This guide will help you check for common problems that cause the log ” The _source field is not searchable ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: index.

Log Context

Log “The _source field is not searchable” class name is We extracted the following from Elasticsearch source code for those seeking an in-depth context :

 throw new UnsupportedOperationException("Cannot fetch values for internal field [" + name() + "].");
 }  @Override
 public Query existsQuery(SearchExecutionContext context) {
 throw new QueryShardException(context; "The _source field is not searchable");
 }  @Override
 public Query termQuery(Object value; SearchExecutionContext context) {
 throw new QueryShardException(context; "The _source field is not searchable");


How helpful was this guide?

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?

Get expert answers on Elasticsearch/OpenSearch