MCPcopy Create free account
hub / github.com/olivere/elastic / TestFetchSourceContextQueryNoFetchSource

Function TestFetchSourceContextQueryNoFetchSource

fetch_source_context_test.go:107–115  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

105}
106
107func TestFetchSourceContextQueryNoFetchSource(t *testing.T) {
108 builder := NewFetchSourceContext(false)
109 values := builder.Query()
110 got := values.Encode()
111 expected := "_source=false"
112 if got != expected {
113 t.Errorf("expected %q; got: %q", expected, got)
114 }
115}
116
117func TestFetchSourceContextQueryFetchSourceWithIncludesAndExcludes(t *testing.T) {
118 builder := NewFetchSourceContext(true).Include("a", "b").Exclude("c")

Callers

nothing calls this directly

Calls 3

QueryMethod · 0.95
NewFetchSourceContextFunction · 0.85
ErrorfMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…