The version 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 _version field in Elasticsearch. The _version field is a system field that keeps track of the version number of the document and is not searchable. To resolve this issue, you can create a custom field to store your version information and make it searchable. Alternatively, you can use the _seq_no and _primary_term fields for optimistic concurrency control, which are searchable.

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 _version 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 _version field is not searchable” class name is We extracted the following from Elasticsearch source code for those seeking an in-depth context :

 }  @Override
 public Query termQuery(Object value; SearchExecutionContext context) {
 throw new QueryShardException(context; "The _version field is not searchable");
 }  @Override
 public ValueFetcher valueFetcher(SearchExecutionContext context; String format) {
 return new DocValueFetcher(docValueFormat(format; null); context.getForField(this; FielddataOperation.SEARCH));


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