Something @robdekort and I were just chatting about was the ability to show contextual keyword snippets in search results, where you show the matched word(s) plus a few either side. This kinda thing (search for "lorem"):
Lorem ipsum dolor sit amet, consectetur adipiscing elit. ... Etiam bibendum lorem nec tempus sollicitudin. ... Sed in dapibus lorem. ... Nunc turpis ipsum, bibendum quis sodales sed, ullamcorper et lorem. Donec et metus hendrerit, interdum elit ut, dignissim dui.
This is something that Algolia (and I think Meilisearch) can do, but it's not currently possible with the internal Comb driver.
I had a look and in principle I think it could be fairly simple to implement, it's basically just running an extra regex against the searched text and then returning a list of matches along with each result:
You could do this manually when rendering the results, but that would involve scanning through all the content a second time, it would be more efficient to do it inside the search driver.
Could then be used with the mark modifier to highlight the matches.
Something @robdekort and I were just chatting about was the ability to show contextual keyword snippets in search results, where you show the matched word(s) plus a few either side. This kinda thing (search for "lorem"):
This is something that Algolia (and I think Meilisearch) can do, but it's not currently possible with the internal Comb driver.
I had a look and in principle I think it could be fairly simple to implement, it's basically just running an extra regex against the searched text and then returning a list of matches along with each result:
You could do this manually when rendering the results, but that would involve scanning through all the content a second time, it would be more efficient to do it inside the search driver.
Could then be used with the
mark
modifier to highlight the matches.