Closed Bug 645681 Opened 14 years ago Closed 14 years ago

Sphinx-escape "-" in hyphenated words

Categories

(support.mozilla.org :: Search, defect, P2)

defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: jsocol, Assigned: jsocol)

Details

Sphinx treats "-" as part of its extended syntax even when it appears in the middle of a hyphenated word. To make queries correctly, one must replace it with "\-" (e.g.: "marque-page" returns the same results as "marque -page", and "marque\-page" seems to get the right result set). We should do this automatically if the hyphen is not preceded by whitespace, e.g.: s/(?<=\S)\-/\\-/
Target Milestone: 2011Q2 → 2.9
https://github.com/jsocol/kitsune/compare/5f4b53d...3d84f67 I am so, so glad I wrote down that regex when I filed this.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Verified search queries do not treat '-' as a special character, able to search and find correct results with and without it.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.