Support Questions
Find answers, ask questions, and share your expertise

Does Solr have a hl.requireFieldMatch equivalent for the unified highlighter?

Does Solr have a hl.requireFieldMatch equivalent for the unified highlighter?


Good afternoon knowledgeable Hortonworks community.

Apache Solr 6.4 saw the release of the unified highlighter which according to the Solr documentation is the "most flexible and performant of the options. We recommend that you try this highlighter even though it isn’t the default (yet)". (ref)

With this in mind I've attempted to follow this recommendation and utilize it in a project I'm designing. The functionality works as expected but I am unable to find a hl.requireFieldMatch equivalent for this highlighter. This means the entire hl.fl list is returned as empty arrays for all fields that do not have a hit highlight associated with them (along with the successful highlight fields). These fields can be ignored by a client but ideally they would not be passed to a calling client as the list can be quite long especially if a wildcard (*) is used in the hl.fl parameter. With this in mind would I be better off continuing with the unified highlighter and ignoring the additional non-highlighted field list or defaulting back to the fastVector highlighter? How significant performance improvement does the unified highlighter offer and am I better off wearing the additional network data overhead to leverage this performance gain? For reference the index is a large one (400,000,000+ documents on Solr 7.3.1) so my initial instinct is to keep using the unified highlighter and remove as much stress on my Solr cluster as possible. Any advice or recommendations would be greatly appreciated.