diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/search/highlight/HighlightPhase.java b/modules/elasticsearch/src/main/java/org/elasticsearch/search/highlight/HighlightPhase.java index 83e8d6ab270..56d5edfc763 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/search/highlight/HighlightPhase.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/search/highlight/HighlightPhase.java @@ -72,7 +72,8 @@ public class HighlightPhase implements SearchHitPhase { for (SearchContextHighlight.Field field : context.highlight().fields()) { FieldMapper mapper = documentMapper.mappers().smartNameFieldMapper(field.field()); if (mapper == null) { - throw new SearchException(context.shardTarget(), "No mapping found for [" + field.field() + "]"); + //Save skipping missing fields + continue; } // if we can do highlighting using Term Vectors, use FastVectorHighlighter, otherwise, use the