Page MenuHomePhabricator

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

Authored by mmodell on Oct 13 2016, 8:59 AM.


Maniphest Tasks
T146673: Contention on search phabricator database creating full phabricator outages
rPHDEP53c6b5383216: Updated git submodules
Patch without arc
git checkout -b D413 && curl -L | git apply

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, testing welcome.

Diff Detail

rPHAB Phabricator
Lint OK
Unit Tests OK
Build Status
Buildable 1141
Build 1679: differential-jessieJenkins
Build 1678: arc lint + arc unit

Event Timeline

mmodell updated this revision to Diff 1100.Oct 13 2016, 8:59 AM
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 edited the test plan for this revision. (Show Details)Oct 13 2016, 9:07 AM
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 accepted this revision.Oct 13 2016, 9:58 AM
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.

mmodell closed this revision.Oct 13 2016, 6:09 PM