Elasticsearch

Ports need-o-tron from solr to elasticsearch so that we're no longer dependent on solr and it's easier to run tests in the development environment.

We've been having trouble maintaining this app because tests didn't run consistently in the standard dev environment. A move to elasticsearch solves that because the search configuration can be contained (almost) entirely within the app, and we're supporting elasticsearch better across the board. If this is merged and deployed we can remove solr from our stack.

The code left after these changes is far from pretty. Some of the abstractions put in place to interface with solr don't make much sense in the elasticsearch world but I wanted to focus on getting something working and tests passing before we consider whether to spend more time tidying up the codebase. I've also used the tire gem which does the job and let me focus on the task at hand. When considering further work on need-o-tron we should think about whether it makes more sense to bring this in-line with everything else and use rummager and/or whether better abstractions in the app itself will remove the need for tire.

I did end up doing a little extra work supporting some gem changes which came in when I ran some other updates and seemed best to work with rather than separate out.

When these changes are deployed some manual work will be needed to create the search index. That can't be done using the tire rake tasks as they assume there's a Need.paginate method. Instead it requires some console activity.