Skip to content

Commit 454abd8

Browse files
author
Peter Bengtsson
authored
Used 'fvh' now that it's been indexed everywhere (#48692)
1 parent 2f50813 commit 454abd8

File tree

1 file changed

+17
-21
lines changed

1 file changed

+17
-21
lines changed

src/search/middleware/es-search.js

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -446,27 +446,23 @@ function getHighlightConfiguration(query, highlights) {
446446
},
447447
},
448448
}
449-
// NOTE (JAN 2024) THIS IS DELIBERATELY COMMENTED OUT. FOR NOW...
450-
// Once we know the indexes have all been rebuilt with the
451-
// new `term_vector: 'with_positions_offsets',` everywhere we
452-
// can un-comment this.
453-
// fields.content_explicit = {
454-
// // Fast Vector Highlighter
455-
// // Using this requires that you first index these fields
456-
// // with {term_vector: 'with_positions_offsets'}
457-
// type: 'fvh',
458-
// fragment_size: 150,
459-
// number_of_fragments: 1,
460-
// no_match_size: 0,
461-
462-
// highlight_query: {
463-
// match_phrase_prefix: {
464-
// content_explicit: {
465-
// query,
466-
// },
467-
// },
468-
// },
469-
// }
449+
fields.content_explicit = {
450+
// Fast Vector Highlighter
451+
// Using this requires that you first index these fields
452+
// with {term_vector: 'with_positions_offsets'}
453+
type: 'fvh',
454+
fragment_size: 150,
455+
number_of_fragments: 1,
456+
no_match_size: 0,
457+
458+
highlight_query: {
459+
match_phrase_prefix: {
460+
content_explicit: {
461+
query,
462+
},
463+
},
464+
},
465+
}
470466
}
471467

472468
return {

0 commit comments

Comments
 (0)