Percolator fields are not searchable directly use a percolate query instead – How to solve this Elasticsearch exception

Opster Team

August-23, Version: 6.8-8.9

Briefly, this error occurs when you try to search percolator fields directly in Elasticsearch. Percolator fields are designed to store queries, not to be queried directly. To resolve this issue, you should use a percolate query, which is specifically designed to handle this type of field. You can also consider restructuring your data if you find yourself needing to search percolator fields directly frequently.

This guide will help you check for common problems that cause the log ” Percolator fields are not searchable directly; use a percolate query instead ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: query, percolator, percolate.

Log Context

Log “Percolator fields are not searchable directly; use a percolate query instead” class name is PercolatorFieldMapper.java. We extracted the following from Elasticsearch source code for those seeking an in-depth context :

 return CONTENT_TYPE;
 }  @Override
 public Query termQuery(Object value; SearchExecutionContext context) {
 throw new QueryShardException(context; "Percolator fields are not searchable directly; use a percolate query instead");
 }  @Override
 public ValueFetcher valueFetcher(SearchExecutionContext context; String format) {
 return SourceValueFetcher.identity(name(); context; format);

 

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?