Rails 4.1.7 Upgrade: Stores > Elasticsearch Query Tweaks

Cleaned up the ES query so as to allow proper aggregations. In the version of the query before this one the REGION_ID would have been added to to the QUERY section instead of standing alone by itself in the FILTER section. As a result when a query was done based on one of the keys from the aggregation buckets the following aggregations only listed the selected region instead of listing all the regions that would be included.

Also tweaked the query so that QUERY_STRING is not listed as part of the QUERY while all other parameters will be part of the FILTER section. Due to this restructuring all ES queries that do not get a value for "q" are now converted to a MATCH_ALL query with the appropriate filters. Given this change the _SCORE associated with the results is now relevant and hence as been added to the list of fields used for sorting. In a MATCH_ALL query all the entries will have the same score and as a result _SCORE will be the same for all the entries returned. For such result the STATE_CODE and NAME of the stores will play a greater role in sorting.

 Changes to be committed:
	modified:   app/controllers/stores_controller.rb
	modified:   app/models/concerns/store_searchable.rb
	modified:   app/views/stores/search_results.html.erb