Skip to content

Commit c0556a1

Browse files
ChrisBrestolfo
authored andcommitted
1 parent fafed33 commit c0556a1

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

lib/elasticsearch/dsl/search/queries/function_score.rb

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ class FunctionScore
3535
option_method :max_boost
3636
option_method :score_mode
3737
option_method :boost_mode
38+
option_method :min_score
3839

3940
def initialize(*args, &block)
4041
super

spec/elasticsearch/dsl/search/queries/function_score_spec.rb

+11
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,17 @@
121121
expect(search.to_hash[:function_score][:boost_mode]).to eq('bar')
122122
end
123123
end
124+
125+
describe '#min_scoore' do
126+
127+
before do
128+
search.min_score('bar')
129+
end
130+
131+
it 'applies the option' do
132+
expect(search.to_hash[:function_score][:min_score]).to eq('bar')
133+
end
134+
end
124135
end
125136

126137
describe '#initialize' do

0 commit comments

Comments
 (0)