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_queries_match_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_queries_match_test.go')
-rw-r--r-- | vendor/gopkg.in/olivere/elastic.v5/search_queries_match_test.go | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/vendor/gopkg.in/olivere/elastic.v5/search_queries_match_test.go b/vendor/gopkg.in/olivere/elastic.v5/search_queries_match_test.go index af3fe688a..dd750cf93 100644 --- a/vendor/gopkg.in/olivere/elastic.v5/search_queries_match_test.go +++ b/vendor/gopkg.in/olivere/elastic.v5/search_queries_match_test.go @@ -26,40 +26,6 @@ func TestMatchQuery(t *testing.T) { } } -func TestMatchPhraseQuery(t *testing.T) { - q := NewMatchPhraseQuery("message", "this is a test") - src, err := q.Source() - if err != nil { - t.Fatal(err) - } - data, err := json.Marshal(src) - if err != nil { - t.Fatalf("marshaling to JSON failed: %v", err) - } - got := string(data) - expected := `{"match":{"message":{"query":"this is a test","type":"phrase"}}}` - if got != expected { - t.Errorf("expected\n%s\n,got:\n%s", expected, got) - } -} - -func TestMatchPhrasePrefixQuery(t *testing.T) { - q := NewMatchPhrasePrefixQuery("message", "this is a test") - src, err := q.Source() - if err != nil { - t.Fatal(err) - } - data, err := json.Marshal(src) - if err != nil { - t.Fatalf("marshaling to JSON failed: %v", err) - } - got := string(data) - expected := `{"match":{"message":{"query":"this is a test","type":"phrase_prefix"}}}` - if got != expected { - t.Errorf("expected\n%s\n,got:\n%s", expected, got) - } -} - func TestMatchQueryWithOptions(t *testing.T) { q := NewMatchQuery("message", "this is a test").Analyzer("whitespace").Operator("or").Boost(2.5) src, err := q.Source() |