Homestyx hydra

R1:fdc0d8c2f6f3

Fix an issue with selecting the right stemmed ngrams with Ferret engine queries

Summary:
Ref T12819. In D18581, I corrected one bug (ngram selection for terms) but introduced a minor new bug. We now pass `' query '` (term corpus with boundary spaces) to the stemmer, but it bails out on this since English words don't start with spaces.

Trim these extra boundary spaces off before invoking the stemmer.

The practical effect of this is that searching for non-stem variations of a word ("detection") now finds…
Repository: R1 hydra
Commit Date: Sep 12 2017