diff options
author | Christopher Speller <crspeller@gmail.com> | 2017-09-29 12:46:30 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-29 12:46:30 -0700 |
commit | b84736e9b6401df0c6eeab9950bef09458a6aefd (patch) | |
tree | d9175208de3236db75a33879750a57b3000ba096 /vendor/gopkg.in/olivere/elastic.v5/search_source_test.go | |
parent | 8b9dbb86133ff0fd6002a391268383d1593918ca (diff) | |
download | chat-b84736e9b6401df0c6eeab9950bef09458a6aefd.tar.gz chat-b84736e9b6401df0c6eeab9950bef09458a6aefd.tar.bz2 chat-b84736e9b6401df0c6eeab9950bef09458a6aefd.zip |
Updating server dependancies. (#7538)
Diffstat (limited to 'vendor/gopkg.in/olivere/elastic.v5/search_source_test.go')
-rw-r--r-- | vendor/gopkg.in/olivere/elastic.v5/search_source_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vendor/gopkg.in/olivere/elastic.v5/search_source_test.go b/vendor/gopkg.in/olivere/elastic.v5/search_source_test.go index 1e4c814f4..49e52f660 100644 --- a/vendor/gopkg.in/olivere/elastic.v5/search_source_test.go +++ b/vendor/gopkg.in/olivere/elastic.v5/search_source_test.go @@ -178,7 +178,7 @@ func TestSearchSourceHighlight(t *testing.T) { func TestSearchSourceRescoring(t *testing.T) { matchAllQ := NewMatchAllQuery() - rescorerQuery := NewMatchQuery("field1", "the quick brown fox").Type("phrase").Slop(2) + rescorerQuery := NewMatchPhraseQuery("field1", "the quick brown fox").Slop(2) rescorer := NewQueryRescorer(rescorerQuery) rescorer = rescorer.QueryWeight(0.7) rescorer = rescorer.RescoreQueryWeight(1.2) @@ -193,7 +193,7 @@ func TestSearchSourceRescoring(t *testing.T) { t.Fatalf("marshaling to JSON failed: %v", err) } got := string(data) - expected := `{"query":{"match_all":{}},"rescore":{"query":{"query_weight":0.7,"rescore_query":{"match":{"field1":{"query":"the quick brown fox","slop":2,"type":"phrase"}}},"rescore_query_weight":1.2},"window_size":50}}` + expected := `{"query":{"match_all":{}},"rescore":{"query":{"query_weight":0.7,"rescore_query":{"match_phrase":{"field1":{"query":"the quick brown fox","slop":2}}},"rescore_query_weight":1.2},"window_size":50}}` if got != expected { t.Errorf("expected\n%s\n,got:\n%s", expected, got) } |