From: Sébastien Lesaint Date: Fri, 15 Mar 2019 14:56:14 +0000 (+0100) Subject: SONAR-11791 fix no more highlighting in component search X-Git-Tag: 7.7~19 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=34ef212d7aaf1ba58af01e42b601e9d3e8fdd814;p=sonarqube.git 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 --- 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();