mapping.keywordFieldBuilder(FIELD_PROJECT_UUID).disableNorms().build();
mapping.keywordFieldBuilder(FIELD_KEY).addSubFields(SORTABLE_ANALYZER).build();
mapping.keywordFieldBuilder(FIELD_NAME)
- .termVectorWithPositionOffsets()
+ .termVectorWithPositionOffsetsForAllSubfields()
.addSubFields(NAME_ANALYZERS)
.build();
/**
* Position offset term vectors are required for the fast_vector_highlighter (fvh).
*/
- public KeywordFieldBuilder termVectorWithPositionOffsets() {
+ public KeywordFieldBuilder termVectorWithPositionOffsetsForAllSubfields() {
this.termVectorWithPositionOffsets = true;
return this;
}
multiFields.put(fieldName, ImmutableMap.of(
"type", FIELD_TYPE_KEYWORD,
"index", INDEX_SEARCHABLE,
- "term_vector", termVectorWithPositionOffsets ? "with_positions_offsets" : "no",
- "norms",
- "false"
+ "norms", "false"
));
hash.put("fields", multiFields);
QProfileDto compareToQProfile = query.getCompareToQProfile();
if (compareToQProfile != null) {
filters.put("comparison",
- QueryBuilders.hasChildQuery(INDEX_TYPE_ACTIVE_RULE.getType(),
+ QueryBuilders.hasChildQuery(
+ INDEX_TYPE_ACTIVE_RULE.getType(),
boolQuery().must(QueryBuilders.termQuery(FIELD_ACTIVE_RULE_PROFILE_UUID, compareToQProfile.getRulesProfileUuid())),
ScoreMode.None));
}