会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
雷雨客
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
21
22
23
24
25
26
27
28
29
···
37
下一页
2019年12月28日
redis的5种数据类型及其基本操作
摘要: 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)
2019年12月25日
redis的启动与关闭以及客户端连接
摘要: 分为前端启动和后端启动 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)
linux下安装单机版redis
摘要: 一、安装 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)
2019年12月23日
(26)ElasticSearch java项目中获取集群、索引信息
摘要: 下面的代码展示了如何获取集群信息和索引信息 @Test public void testCluster() throws IOException, InterruptedException, ExecutionException { //指定集群 Settings settings = Settin
阅读全文
posted @ 2019-12-23 00:43 雷雨客
阅读(1725)
评论(0)
推荐(0)
(25)ElasticSearch java项目中聚合查询terms、filter、filters、range、missing
摘要: 1、按年龄分组,查询每组的个数 @Test public void testTerms() throws IOException, InterruptedException, ExecutionException { //指定集群 Settings settings = Settings.build
阅读全文
posted @ 2019-12-23 00:40 雷雨客
阅读(3262)
评论(0)
推荐(0)
(24)ElasticSearch java项目中组合查询示例
摘要: 查询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)
(23)ElasticSearch java项目中查询所有字段筛选文档——queryStringQuery和simpleQueryStringQuery
摘要: 1、查询所有字段中含有changge且不含有hejiu的文档 @Test public void testQueryStringQuery() throws IOException, InterruptedException, ExecutionException { //指定集群 Settings
阅读全文
posted @ 2019-12-23 00:23 雷雨客
阅读(3514)
评论(0)
推荐(0)
(22)ElasticSearch java项目中聚合运算求最大、最小、平均、求和以及求不同值
摘要: 1、求索引lib3下的age字段的最大值 @Test public void testAggMax() throws IOException, InterruptedException, ExecutionException { //指定集群 Settings settings = Settings
阅读全文
posted @ 2019-12-23 00:10 雷雨客
阅读(2532)
评论(0)
推荐(0)
2019年12月22日
(21)ElasticSearch java项目中match、multimath、term、terms以及根据范围、前缀、类型等查询示例
摘要: 1、查询index1中content字段包含工厂的文档 @Test public void testMatch() throws IOException, InterruptedException, ExecutionException { //指定集群 Settings settings = Se
阅读全文
posted @ 2019-12-22 23:55 雷雨客
阅读(636)
评论(0)
推荐(0)
(20)ElasticSearch java项目中的根据指定条件删除文档和查询所有文档
摘要: 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
下一页