Add search

Note: I can't add anything to tests.py since search depends on postgres's full text search capabilities (and the tests run in sqlite). I'm going to try to add something to functional_tests, but haven't worked out how best to do that yet (need to make them work generally...).
Yes! Will change.