From 34ef212d7aaf1ba58af01e42b601e9d3e8fdd814 Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=A9bastien=20Lesaint?= Date: Fri, 15 Mar 2019 15:56:14 +0100 Subject: [PATCH] SONAR-11791 fix no more highlighting in component search higlighting requires initial value of field stored, either in source or as a stored field Source used to be stored in the Component Idex. To reduce impact on index size, we will make only the name field stored in the Component Index --- .../sonar/server/component/index/ComponentIndexDefinition.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/sonar-server-common/src/main/java/org/sonar/server/component/index/ComponentIndexDefinition.java b/server/sonar-server-common/src/main/java/org/sonar/server/component/index/ComponentIndexDefinition.java index 42916f12d29..dde34c989a0 100644 --- a/server/sonar-server-common/src/main/java/org/sonar/server/component/index/ComponentIndexDefinition.java +++ b/server/sonar-server-common/src/main/java/org/sonar/server/component/index/ComponentIndexDefinition.java @@ -88,6 +88,8 @@ public class ComponentIndexDefinition implements IndexDefinition { mapping.keywordFieldBuilder(FIELD_KEY).addSubFields(SORTABLE_ANALYZER).build(); mapping.textFieldBuilder(FIELD_NAME) .withFieldData() + // required by highlighting + .store() .termVectorWithPositionOffsets() .addSubFields(NAME_ANALYZERS) .build(); -- 2.39.5