#25747: Fix check of termVector with and without offsets

This commit is contained in:
Jim Ferenczi 2017-07-17 19:46:42 +02:00
parent 56b1250a34
commit c6d9456693
1 changed files with 2 additions and 2 deletions

View File

@ -219,9 +219,9 @@ public class UnifiedHighlighter implements Highlighter {
private OffsetSource getOffsetSource(MappedFieldType fieldType) { private OffsetSource getOffsetSource(MappedFieldType fieldType) {
if (fieldType.indexOptions() == IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS) { if (fieldType.indexOptions() == IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS) {
return fieldType.storeTermVectorOffsets() ? OffsetSource.POSTINGS_WITH_TERM_VECTORS : OffsetSource.POSTINGS; return fieldType.storeTermVectors() ? OffsetSource.POSTINGS_WITH_TERM_VECTORS : OffsetSource.POSTINGS;
} }
if (fieldType.storeTermVectors()) { if (fieldType.storeTermVectorOffsets()) {
return OffsetSource.TERM_VECTORS; return OffsetSource.TERM_VECTORS;
} }
return OffsetSource.ANALYSIS; return OffsetSource.ANALYSIS;