Commit b88885fc65c9ea63085014270aa6a22135af9d59
Committed by
Macartur Sousa
1 parent
b75bed9e
Exists in
elasticsearch_filter
and in
1 other branch
Elasticsearch: fixes for search mapping
Showing
2 changed files
with
14 additions
and
1 deletions
Show diff stats
plugins/elasticsearch/controllers/elasticsearch_plugin_controller.rb
| @@ -33,7 +33,7 @@ class ElasticsearchPluginController < ApplicationController | @@ -33,7 +33,7 @@ class ElasticsearchPluginController < ApplicationController | ||
| 33 | def get_query text, klass | 33 | def get_query text, klass |
| 34 | query = {} | 34 | query = {} |
| 35 | unless text.blank? | 35 | unless text.blank? |
| 36 | - | 36 | + text = text.downcase |
| 37 | fields = klass::SEARCHABLE_FIELDS.map do |key, value| | 37 | fields = klass::SEARCHABLE_FIELDS.map do |key, value| |
| 38 | if value[:weight] | 38 | if value[:weight] |
| 39 | "#{key}^#{value[:weight]}" | 39 | "#{key}^#{value[:weight]}" |