Page MenuHomePhabricator

Fix InnoDB Fulltext Search: Prepend + to each word in the query
ClosedPublic

Authored by mmodell on Oct 13 2016, 8:59 AM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 10 2022, 12:25 PM
Unknown Object (File)
Dec 5 2022, 11:41 AM
Unknown Object (File)
Sep 22 2022, 7:45 PM
Unknown Object (File)
Aug 21 2022, 4:23 PM
Unknown Object (File)
Apr 12 2017, 9:22 PM
Unknown Object (File)
Apr 5 2017, 8:07 AM
Unknown Object (File)
Mar 15 2017, 7:09 AM
Unknown Object (File)
Feb 20 2017, 7:46 PM
Subscribers

Details

Maniphest Tasks
T146673: Contention on search phabricator database creating full phabricator outages
Reviewers
Paladox
jcrespo
hashar
Commits
rPHDEP53c6b5383216: Updated git submodules
Patch without arc
git checkout -b D413 && curl -L https://phabricator.wikimedia.org/D413?download=true | git apply
Summary

Innodb fulltext search doesn't support altering ft_boolean_syntax
to make queries default to AND instead of OR. This forces boolean
AND matching by prepending + to all words that don't already have
either prefix of '+' or '-'

Refs T146673

Test Plan

Ran several search queries on my test instance of
phabricator and in each case I got sensible results.

This patch is also deployed on http://phab-01.wmflabs.org, testing welcome.

Diff Detail

Repository
rPHAB Phabricator
Branch
wmf/stable
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 1141
Build 1679: differential-jessieJenkins
Build 1678: arc lint + arc unit

Event Timeline

mmodell retitled this revision from to Fix InnoDB Fulltext Search: Prepend + to each word in the query.
mmodell updated this object.
mmodell edited the test plan for this revision. (Show Details)
mmodell added a reviewer: jcrespo.
mmodell updated the revert plan for this revision. (Show Details)

Note: the build failure is because jenkins isn't set up to handle phabricator's unit test suite. The test suite passed in my dev environment.

Paladox edited edge metadata.
This revision is now accepted and ready to land.Oct 13 2016, 9:58 AM

Thanks to @Paladox for switching phab-01 to innodb. I'm reindexing now so searches should actually be hitting the innodb search index now.

This change is now cherry-picked on iridium and merged to wmf/stable for the next deploy.