|
|
|
@ -49,6 +49,28 @@ public class RedissonSearchTest extends DockerRedisStackTest {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
public void testSearchNoContent() {
|
|
|
|
|
RMap<String, SimpleObject> m = redisson.getMap("doc:1", new CompositeCodec(StringCodec.INSTANCE, redisson.getConfig().getCodec()));
|
|
|
|
|
m.put("t1", new SimpleObject("name1"));
|
|
|
|
|
m.put("t2", new SimpleObject("name2"));
|
|
|
|
|
|
|
|
|
|
RMap<String, SimpleObject> m2 = redisson.getMap("doc:2", new CompositeCodec(StringCodec.INSTANCE, redisson.getConfig().getCodec()));
|
|
|
|
|
m2.put("t1", new SimpleObject("name3"));
|
|
|
|
|
m2.put("t2", new SimpleObject("name4"));
|
|
|
|
|
|
|
|
|
|
RSearch s = redisson.getSearch();
|
|
|
|
|
assertThat(s.getIndexes()).isEmpty();
|
|
|
|
|
|
|
|
|
|
s.createIndex("idx:1", IndexOptions.defaults()
|
|
|
|
|
.on(IndexType.HASH)
|
|
|
|
|
.prefix(Arrays.asList("doc:")),
|
|
|
|
|
FieldIndex.text("t1"),
|
|
|
|
|
FieldIndex.text("t2"));
|
|
|
|
|
|
|
|
|
|
s.search("idx:1", "*", QueryOptions.defaults().noContent(true));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
public void testMapAggregateWithCursor() {
|
|
|
|
|
RMap<String, Object> m = redisson.getMap("doc:1", new CompositeCodec(StringCodec.INSTANCE, redisson.getConfig().getCodec()));
|
|
|
|
|