install
1 | docker pull redislabs/redisearch:latest |
dependency
1 | <dependencies> |
create client
Initializing the client with JedisPool:1
Client client = new Client("testing", "localhost", 6379);
Initializing the client with JedisSentinelPool:1
2
3
4
5
6
7
8
9
10private static final String MASTER_NAME = "mymaster";
private static final Set<String> sentinels;
static {
sentinels = new HashSet();
sentinels.add("localhost:7000");
sentinels.add("localhost:7001");
sentinels.add("localhost:7002");
}
...
Client client = new Client("testung", MASTER_NAME, sentinels);
create schema
1 | // Create schema |
adding documents
1 | // Create document |
search
1 | // actual search |
1 | // aggregation query |
https://github.com/RediSearch/RediSearch
https://github.com/RediSearch/JRediSearch