hypothesis/h — pull request #888 by gergely-ujvari (2013-11-06 20:45:55+00:00)
Title: Lookup exact username from the db for stream-search

Searching for a username which contains uppercase letters didn't work for stream searches, because we searched case insensitive (and thus converted the username to lowercase), but ES stored the username case sensitive since it's index is set to 'not_analyzed'. (And it is a requirement to be able to search for user name case insensitive)

The straightforward solution would be changing the indexing of the user field, but since currently we do not want ES reindexing, this solution was born: in the streamer.py we search for the user by the given username which is luckily an insensitive-search and that way we can have the case-sensitive username and feeding this to the ES, and that way the stream provides the awated results. This can be replaced when the index is changed.

Fixes #880

I'm opening a PR because it is a little hack. @tilgovi : Is this okay for you?