Fixes bug 838897 - Fixed the vesions filter in search with elasticsearch.

This PR adds integration tests for elasticsearch. They are disabled by default though, so we can pass jenkins' build. If you want to run them locally, you need an elasticsearch instance working on port 9200, and to run ``RUN_ES_INTEGRATION_TESTS=1 make test``. 

@ErikRose r?