reactivecore icon indicating copy to clipboard operation
reactivecore copied to clipboard

Suggestion filtering ignores+removes 'highlight' from ElasticSearch hits

Open jogam opened this issue 6 years ago • 0 comments

ReactiveSearch.DataSearch component provides properties for customHighlight and parseSuggestion to customise suggestions for current search input. Unfortunately it appears the highlight entry of the returned ES hits are being neglected/discarded during the query result processing here. (the customHighlight query configuration is properly included in the query sent to ES though!)

Maybe I miss something but it seems to be caused by calling getSuggestions of this packages utils/suggestions.js module as can be seen in onSuggestions( query.result ) call here for WEB Version or Vue.js Version.

If the above is true, would it be possible to add/maintain highlight either as new field in suggestions option dict, e.g. suggestion.highlight or as entry in the suggestion.source field e.g. suggestion.source._highlight?

NOTE: highlight may? not be present in hits/query result if customHighlight is not configured

jogam avatar Nov 27 '19 20:11 jogam