// Generated from search-request-scroll_09d0e8454a413cfce28212a841b2f2bd_test.go
//
[source, go]
----
{
	res, err := es.Search(
		es.Search.WithIndex("twitter"),
		es.Search.WithBody(strings.NewReader(`{
	  "slice": {
	    "id": 0,
	    "max": 2
	  },
	  "query": {
	    "match": {
	      "title": "elasticsearch"
	    }
	  }
	}`)),
		es.Search.WithScroll(time.Duration(60000000000)),
		es.Search.WithPretty(),
	)
	fmt.Println(res, err)
}

{
	res, err := es.Search(
		es.Search.WithIndex("twitter"),
		es.Search.WithBody(strings.NewReader(`{
	  "slice": {
	    "id": 1,
	    "max": 2
	  },
	  "query": {
	    "match": {
	      "title": "elasticsearch"
	    }
	  }
	}`)),
		es.Search.WithScroll(time.Duration(60000000000)),
		es.Search.WithPretty(),
	)
	fmt.Println(res, err)
}
----
