diff options
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() |