Skip to content

Instantly share code, notes, and snippets.

View darethas's full-sized avatar

Dimitrios Arethas darethas

  • Charlotte, NC
View GitHub Profile
@jpickwell
jpickwell / install-redis.sh
Last active May 14, 2024 07:38 — forked from khelll/install-redis.sh
Installing Redis 5.0.0 on Amazon Linux
#!/bin/bash
###############################################
# To use:
# chmod +x install-redis.sh
# ./install-redis.sh
###############################################
version=5.0.0
SearchResponse searchResponse = client.prepareSearch()
.setQuery(matchAllQuery())
.setSize(35)
.setScroll(TimeValue.timeValueMinutes(2))
.addSort("field", SortOrder.ASC)
.execute().actionGet();
assertThat(searchResponse.hits().getTotalHits(), equalTo(100l));
assertThat(searchResponse.hits().hits().length, equalTo(35));