286 switch from solr to elastic search

Should do the first fixes for the search with elasticsearch instead of solr
Metrics/CyclomaticComplexity: Cyclomatic complexity for search is too high. [7/6]<br>Metrics/MethodLength: Method has too many lines. [22/10]<br>Metrics/PerceivedComplexity: Perceived complexity for search is too high. [8/7]