Skip to content

Commit

Permalink
[DSL] Removes auto_generate_phrase_queries deprecated parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
picandocodigo committed Feb 22, 2021
1 parent da5788f commit 6f55446
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
3 changes: 0 additions & 3 deletions lib/elasticsearch/dsl/search/queries/query_string.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ module Elasticsearch
module DSL
module Search
module Queries

# A query which returns documents matching a specified expression in the Lucene Query String syntax
#
# @example
Expand Down Expand Up @@ -54,7 +53,6 @@ class QueryString
option_method :phrase_slop
option_method :boost
option_method :analyze_wildcard
option_method :auto_generate_phrase_queries
option_method :auto_generate_synonyms_phrase_query
option_method :minimum_should_match
option_method :lenient
Expand All @@ -63,7 +61,6 @@ class QueryString
option_method :tie_breaker
option_method :time_zone
end

end
end
end
Expand Down
13 changes: 4 additions & 9 deletions spec/elasticsearch/dsl/search/queries/query_string_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@
require 'spec_helper'

describe Elasticsearch::DSL::Search::Queries::QueryString do

describe '#to_hash' do

let(:search) do
described_class.new
end
Expand All @@ -31,12 +29,12 @@
end

context 'when options methods are called' do

let(:search) do
described_class.new
end

[ 'query',
[
'query',
'fields',
'type',
'default_field',
Expand All @@ -50,17 +48,16 @@
'phrase_slop',
'boost',
'analyze_wildcard',
'auto_generate_phrase_queries',
'auto_generate_synonyms_phrase_query',
'minimum_should_match',
'lenient',
'locale',
'use_dis_max',
'tie_breaker',
'time_zone'].each do |option|
'time_zone'
].each do |option|

describe "##{option}" do

before do
search.send(option, 'bar')
end
Expand All @@ -73,9 +70,7 @@
end

describe '#initialize' do

context 'when a block is provided' do

let(:search) do
described_class.new do
query 'foo AND bar'
Expand Down

0 comments on commit 6f55446

Please sign in to comment.