No field mapping can be found for the field with name [*]

Hi,

I am running into a very strange issue after upgrading to Elasticsearch 7.10.

I keep getting the following error in a particular percolate query:

“No field mapping can be found for the field with name [*]”

This is only occurring on one shard in particular. The other shards don’t run into this issue.

I’ve narrowed down that the error occurs on this one shard when two fields have two values of string type:

    “query”: {
      "percolate”: {
         “field”:”query”,
         “document”: {
             “fieldA”:"AB",
             “fieldB”:"AB"
          }
        }
     }
  1. If I change “AB” to any other random strings (even if they are the same), all shards succeed.
  2. If I remove one of the fields, all shards succeed.
  3. If either of the fields doesn't have an existing mapping, all shards succeed.

And here is the stacktrace:

QueryShardException[No field mapping can be found for the field with name [*]]
at org.elasticsearch.index.query.QueryShardContext.failIfFieldMappingNotFound(QueryShardContext.java:309)
at org.elasticsearch.index.query.QueryShardContext.fieldMapper(QueryShardContext.java:253)
at org.elasticsearch.index.search.QueryStringQueryParser.getFieldQuery(QueryStringQueryParser.java:330)
at org.apache.lucene.queryparser.classic.QueryParserBase.handleBareTokenQuery(QueryParserBase.java:830)
at org.apache.lucene.queryparser.classic.QueryParser.Term(QueryParser.java:469)
at org.apache.lucene.queryparser.classic.QueryParser.Clause(QueryParser.java:355)
at org.apache.lucene.queryparser.classic.QueryParser.Query(QueryParser.java:303)
at org.apache.lucene.queryparser.classic.QueryParser.TopLevelQuery(QueryParser.java:215)
at org.apache.lucene.queryparser.classic.QueryParserBase.parse(QueryParserBase.java:109)
at org.elasticsearch.index.search.QueryStringQueryParser.parse(QueryStringQueryParser.java:809)
at org.elasticsearch.index.query.QueryStringQueryBuilder.doToQuery(QueryStringQueryBuilder.java:912)
at org.elasticsearch.index.query.AbstractQueryBuilder.toQuery(AbstractQueryBuilder.java:103)
at org.elasticsearch.percolator.PercolateQueryBuilder.lambda$createStore$8(PercolateQueryBuilder.java:667)
at org.elasticsearch.percolator.PercolateQuery$1$1.matchDocId(PercolateQuery.java:130)
at org.elasticsearch.percolator.PercolateQuery$BaseScorer$1.matches(PercolateQuery.java:286)
at org.apache.lucene.search.Weight$DefaultBulkScorer.scoreRange(Weight.java:250)
at org.apache.lucene.search.Weight$DefaultBulkScorer.score(Weight.java:229)
at org.elasticsearch.search.internal.CancellableBulkScorer.score(CancellableBulkScorer.java:56)
at org.apache.lucene.search.BulkScorer.score(BulkScorer.java:39)
at org.elasticsearch.search.internal.ContextIndexSearcher.searchLeaf(ContextIndexSearcher.java:226)
at org.elasticsearch.search.internal.ContextIndexSearcher.search(ContextIndexSearcher.java:199)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:445)
at org.elasticsearch.search.query.QueryPhase.searchWithCollector(QueryPhase.java:343)
at org.elasticsearch.search.query.QueryPhase.executeInternal(QueryPhase.java:298)
at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:150)
at org.elasticsearch.search.SearchService.loadOrExecuteQueryPhase(SearchService.java:362)
at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:435)
at org.elasticsearch.search.SearchService.access$200(SearchService.java:136)
at org.elasticsearch.search.SearchService$2.lambda$onResponse$0(SearchService.java:396)
at org.elasticsearch.search.SearchService.lambda$runAsync$0(SearchService.java:412)
at org.elasticsearch.common.util.concurrent.TimedRunnable.doRun(TimedRunnable.java:44)
at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:737)at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

It's only when both fields have the associated value "US" that the one shard fails. Do any of you have any ideas as to what may be going on?

I do not know the percolator syntax, but the above example is not valid JSON. You are missing a " for the fieldA value and lack a comma at the end of the same line. I would recommend showing a couple of full examples of what is and is not working. It is also usually recommended to specify which version of Elasticsearch you are using.

Thanks. I updated my original message.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.