s
for [weblinks]), the result quality deteriorated: the Shared weblinks
page drops out of the autocomplete. The dynamic results performed worse than the actual SERP. The problem seems to be the implementation of the Lunr.js wildcard (to support dynamic updating as the user types their query): var results = idx.search(searchTerm + '*');
A search for [weblinks*] does not match the term weblinks
. It appears to only match pages with links to the Shared weblinks
page. The current solution will take advantage of the implicit OR
in Lunr.js queries: var results = idx.search(searchTerm + '* ' + searchTerm);
Posts
as a top result. I modified the code that combines the hand-curated queries and the dynamic results to prioritize exact URL or title matches (slugified).