Coroico / AdvSearch

Dynamic content search add-on for MODx Revolution that supports results highlighting, faceted search and search in custom packages
21 stars 14 forks source link

Fix and improve highlighting of independent fields and TVs #88

Open BenceSzalai opened 4 years ago

BenceSzalai commented 4 years ago

Fix: The extracts are searched and extracted from each resource fields individually, so when the &showExtract property of the AdvSearch snippet contains multiple fields and TVs they are examined independently. This help to avoid multiple issues. E.g. &showExtract=`3:content,pagetitle`, and there's a search term match at the beginning of the pagetitle, the extract was showing the end of content concatenated to the beginning of the pagetitle, also worse, if the ending of content concatenated with the beginning of pagetitle created a match, it was shown as a highlight, while in reality none of the two has a match.