mysociety/popit-api — pull request #19 by hecticjeff (2013-12-13 17:39:20+00:00)
Title: Name resolution

:warning: Under construction :warning:

This is the work on the name resolution/search feature. The initial version of the search API is now working, you can query for a name and it will return all the records which match that name.

There are various reasons for going with the double metaphone implementation, it was already done in popit, although that implementation wasn't working because writes go via the API (so the code that does the name indexing wasn't being called in popit), so this pull request actually fixes the popit implementation of search as well (by accident). I didn't use mongo's search implementation because it's still marked as experimental, it's not even enabled by default you have to give a special flag when starting the daemon.

It may still be the case that elasticsearch turns out to be the better choice down the road, so I've tried to isolate the search code as much as possible so if we need to change the search backend it should be *reasonably* painless.

Fixes https://github.com/mysociety/popit/issues/265
Fixes https://github.com/mysociety/popit/issues/267