Method |
Description |
|
determineSnipLocation ( array $locations, integer $prevCount ) : integer |
Work out which is the most relevant portion to display
This is done by looping over each match and finding the smallest distance between two found
strings. The idea being that the closer the terms are the better match the snippet would be. |
|
extractLocations ( array $words, string $fulltext ) : array |
Find the locations of each of the words. |
|
extractRelevant ( string | array $words, string $fulltext, integer $relLength = 300 ) : mixed | string |
Center on, and highlight search terms in excerpts. |
|