The discussion revolves around a search issue on Meta with the word “canned.” dax reported that searching for “canned,” “Canned,” or “canned replies” yields no results, despite it working on their own forum. Mittineague suggested it might be related to the topic starting in “uncategorized,” but dax found that Google does return results for the search term.
sam initially found the issue odd, but later discovered that the search term “canned” is being stemmed to “can,” which is a stopword, resulting in zero results. codinghorror questioned the correctness of stemming “canned” to “can,” and sam explained that it is due to the Snowball stemming algorithm.
sam has since fixed the issue by committing a change to the Discourse GitHub repository. In the long term, it may be beneficial to shift stemming into Ruby and use a simple full-text index.
Today (and few days ago) I tried to search here on Meta the word “canned” (for canned replies plugin) but the results is always No results found.
Same results searching “Canned” or even “canned replies”.
This is driving me crazy because on my forum (v1.7.0.beta5 +45) it works:
OK, this is what is happening… “canned” is being stemmed to “can” and indexed as “can”, later on we perform a TO_TSQUERY on the stemmed word “can” instead of “canned” and … can happens to be a stopword so it gets zero results.
The fix is to stop stemming the search term, will sort it out.