上一页 1 ··· 21 22 23 24 25 26 27 28 29 ··· 37 下一页
摘要: redis支持5种数据类型:【字符串:String】、【散列(哈希):Hash】、【列表:List】、【集合:Set】、【有序集合:SortedSet(zset)】,下面分别介绍5中数据类型的常用命令以及应用场景。 1、String类型 (01)赋值:set key value (02)取值:get 阅读全文
posted @ 2019-12-28 23:10 雷雨客 阅读(2050) 评论(0) 推荐(0)
摘要: 分为前端启动和后端启动 1、前端启动与关闭 启动,进入到安装目录的bin下(/usr/local/myroom/redis-5.0.4/bin) [root@localhost bin]# ./redis-server 关闭,在启动界面直接Ctrl+c或使用下面命令 [root@localhost 阅读全文
posted @ 2019-12-25 22:50 雷雨客 阅读(1969) 评论(0) 推荐(0)
摘要: 一、安装 1、安装gcc-c++ 首先执行 gcc -v,如果输出“未找到命令”,则需要安装gcc-c++,安装命令如下: yum install gcc-c++ 2、解压Redis源码包 tar -zxvf redis-5.0.4.tar.gz -C /usr/local/myroom/ 3、进入 阅读全文
posted @ 2019-12-25 22:18 雷雨客 阅读(356) 评论(0) 推荐(0)
摘要: 下面的代码展示了如何获取集群信息和索引信息 @Test public void testCluster() throws IOException, InterruptedException, ExecutionException { //指定集群 Settings settings = Settin 阅读全文
posted @ 2019-12-23 00:43 雷雨客 阅读(1725) 评论(0) 推荐(0)
摘要: 1、按年龄分组,查询每组的个数 @Test public void testTerms() throws IOException, InterruptedException, ExecutionException { //指定集群 Settings settings = Settings.build 阅读全文
posted @ 2019-12-23 00:40 雷雨客 阅读(3262) 评论(0) 推荐(0)
摘要: 查询interests字段包含changge并且不包含lvyou,或者address字段包含bei jing的文档,并且前面两种都要满足birthday>="1980-01-01" @Test public void testBoolQuery() throws IOException, Inter 阅读全文
posted @ 2019-12-23 00:32 雷雨客 阅读(877) 评论(0) 推荐(0)
摘要: 1、查询所有字段中含有changge且不含有hejiu的文档 @Test public void testQueryStringQuery() throws IOException, InterruptedException, ExecutionException { //指定集群 Settings 阅读全文
posted @ 2019-12-23 00:23 雷雨客 阅读(3514) 评论(0) 推荐(0)
摘要: 1、求索引lib3下的age字段的最大值 @Test public void testAggMax() throws IOException, InterruptedException, ExecutionException { //指定集群 Settings settings = Settings 阅读全文
posted @ 2019-12-23 00:10 雷雨客 阅读(2532) 评论(0) 推荐(0)
摘要: 1、查询index1中content字段包含工厂的文档 @Test public void testMatch() throws IOException, InterruptedException, ExecutionException { //指定集群 Settings settings = Se 阅读全文
posted @ 2019-12-22 23:55 雷雨客 阅读(636) 评论(0) 推荐(0)
摘要: 1、删除index1中,title包含工厂的文档 @Test public void testQueryDelete() throws IOException, InterruptedException, ExecutionException { //指定集群 Settings settings = 阅读全文
posted @ 2019-12-22 23:41 雷雨客 阅读(956) 评论(0) 推荐(0)
上一页 1 ··· 21 22 23 24 25 26 27 28 29 ··· 37 下一页