Open mprofitlich opened 3 years ago
I think I used that too some time ago. But if I remember correctly, the side-effect was that the extracts were offset from the actual keywords.
That’s true. The results are still correct but the extract shown often doesn’t show the keyword (which is there but at another place in the text). How did you solve or circumvent the problem?
¯\_(ツ)_/¯
I sometimes got the PHP error _mbstrpos(): Offset not contained in string. I cannot find out when it happens and when not.
There’s an old thread from 2012 on the Symphony forum in which Nikolai Shmakov gives a solution that also works for me:
Replace line 383 in class.search_index_php
$p = $match[0][1];
against$p = $match[0][1]/2;