Skip to content

Commit 33d954e

Browse files
committed
[DSL] Added an integration test for the "match phrase prefix" query
Related: #448
1 parent 454e287 commit 33d954e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/integration/search_query_test.rb

+8
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,14 @@ class QueryIntegrationTest < ::Elasticsearch::Test::IntegrationTestCase
2525
end
2626
end
2727

28+
context "for match_phrase_prefix query" do
29+
should "find the document" do
30+
response = @client.search index: 'test', body: search { query { match_phrase_prefix title: 'te' } }.to_hash
31+
32+
assert_equal 1, response['hits']['total']
33+
end
34+
end
35+
2836
context "for query_string query" do
2937
should "find the document" do
3038
response = @client.search index: 'test', body: search { query { query_string { query 'te*' } } }.to_hash

0 commit comments

Comments
 (0)