Skip to content

Commit

Permalink
fix: dont override ts_args in fast_facet
Browse files Browse the repository at this point in the history
  • Loading branch information
isqad committed Jun 28, 2019
1 parent f69bb11 commit 2447bb1
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions lib/sphinx/integration/fast_facet.rb
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# coding: utf-8
module Sphinx::Integration::FastFacet
extend ActiveSupport::Concern

module ClassMethods

def fast_facet_ts_args(facet, ts_args = {})
ts_args.merge(:group => facet,
:limit => ts_args[:limit] || max_matches,
:page => 1,
:rank_mode => :none,
:match_mode => ThinkingSphinx::DEFAULT_MATCH)
{
group: facet,
limit: max_matches,
page: 1,
rank_mode: :none,
match_mode: ThinkingSphinx::DEFAULT_MATCH
}.merge(ts_args)
end

def fast_facet_compute_result(sph_data, ts_args = {})
Expand Down Expand Up @@ -37,6 +37,5 @@ def fast_facet(query, facet, ts_args = {})
ts_result = self.search_for_ids(query, new_ts_args)
fast_facet_compute_result(ts_result, new_ts_args)
end

end
end
end

0 comments on commit 2447bb1

Please sign in to comment.