Commit 61b9102ac5833f57acb1a7a1dfbed8e8a70b7182

Authored by Andrew Kane
1 parent 7999b2b3

Updated spacing

Showing 1 changed file with 3 additions and 5 deletions   Show diff stats
lib/searchkick/query.rb
... ... @@ -166,7 +166,6 @@ module Searchkick
166 166 personalize_field = searchkick_options[:personalize]
167 167  
168 168 all = term == "*"
169   -
170 169  
171 170 options[:json] ||= options[:body]
172 171 if options[:json]
... ... @@ -304,9 +303,7 @@ module Searchkick
304 303 multiply_filters = []
305 304  
306 305 set_boost_by(multiply_filters, custom_filters)
307   -
308 306 set_boost_where(custom_filters, personalize_field)
309   -
310 307 set_boost_by_distance(custom_filters) if options[:boost_by_distance]
311 308  
312 309 if custom_filters.any?
... ... @@ -348,14 +345,13 @@ module Searchkick
348 345  
349 346 # aggregations
350 347 set_aggregations(payload) if options[:aggs]
351   -
  348 +
352 349 # suggestions
353 350 set_suggestions(payload) if options[:suggest]
354 351  
355 352 # highlight
356 353 set_highlights(payload, fields) if options[:highlight]
357 354  
358   -
359 355 # An empty array will cause only the _id and _type for each hit to be returned
360 356 # doc for :select - http://www.elasticsearch.org/guide/reference/api/search/fields/
361 357 # doc for :select_v2 - https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-source-filtering.html
... ... @@ -571,6 +567,7 @@ module Searchkick
571 567 facets = Hash[facets.map { |f| [f, {}] }] if facets.is_a?(Array) # convert to more advanced syntax
572 568 facet_limits = {}
573 569 payload[:facets] = {}
  570 +
574 571 facets.each do |field, facet_options|
575 572 # ask for extra facets due to
576 573 # https://github.com/elasticsearch/elasticsearch/issues/1305
... ... @@ -614,6 +611,7 @@ module Searchkick
614 611 }
615 612 end
616 613 end
  614 +
617 615 @facet_limits = facet_limits
618 616 end
619 617  
... ...