Elasticsearch 文档专用
ES安装等操作
http://blog.csdn.net/cnweike/article/details/33736429
https://www.elastic.co/guide/cn/elasticsearch/guide/current/index.html
http://blog.csdn.net/sinat_28224453/article/details/51134978
http://blog.csdn.net/peibolinux/article/details/37560657
./elasticsearch --cluster.name xiaotian --node.name xiaotian_node
useradd es -g es -p es
chown -R es:es elasticsearch-6.0.6
es安装问题总结:
http://blog.csdn.net/wang_zhenwei/article/details/53785048
curl -XPUT -u elastic 'http://http://192.168.22.143:9200/_xpack/security/user/elastic/_password' -H 'Content-Type: application/json' -d '{"password" : "123"}'
########################################
Changed password for user kibana
PASSWORD kibana = xTkp&ONvKAo5!r4OB770
Changed password for user logstash_system
PASSWORD logstash_system = @fI4nPRVokNbvTZ1P_ti
Changed password for user elastic
PASSWORD elastic = F~~aA%DgJcXLK5lKXNU9
http://192.168.22.143:5601/
curl -XPUT 'localhost:9200/customer/external/1?pretty' -d '{"name": "John Doe"}'
curl -XPUT 'http://192.168.22.139:9200/customer/external/1?pretty' -d '{"name": "John Doe"}'
curl -XPUT 'http://127.0.0.1:9200/custo/user22/1?pretty' -H 'Content-Type: application/json' -d '{"name":"John Doe"}'
http://man.linuxde.net/curl
kibana安装
http://blog.csdn.net/jklfjsdj79hiofo/article/details/72355167
curl -XPUT 'http://192.168.22.143:9200/custo/user/?pretty' -H 'Content-Type: application/json' -d '{"id":"3","name":"jim","age":"12","tel":"18612855318"}'
curl -XPOST 'http://192.168.22.143:9200/red89/_setting'
//查询
http://blog.csdn.net/asia_kobe/article/details/51377631
https://www.cnblogs.com/jasonduan/p/4387156.html
https://www.elastic.co/guide/en/elasticsearch/client/java-api/current/_maven_repository.html
###################################设置mapping######################################################
curl -XPUT http://192.168.22.143:9200/red88/ -H 'Content-Type: application/json' -d '{
"mappings" : {
"test" : {
"properties" : {
"attr_name" : { "type":"keyword" }
}
}
}
}'
curl -XDELETE http://192.168.22.143:9200/red33/ -H 'Content-Type: application/json' -d '{
"mappings" : {
"test" : {
"properties" : {
"attr_name" : { "index":"not_analyzed" }
}
}
}
}'
curl -XPUT http://192.168.22.143:9200/red88/_mapping/test -H 'Content-Type: application/json' -d '{
"properties": {
"attr_name": {
"type":"string",
"index": "not_analyzed",
"fielddata": true
}
}
}'
curl -XPOST 'http://192.168.22.143:9200/red1/test'
curl -XPUT 'http://192.168.22.143:9200/red1'
curl -XPUT http://192.168.22.143:9200/temp/_mapping/test -H 'Content-Type: application/json' -d
'{
"test": {
properties: {
"attr_name": {"type":"string", "index": "not_analyzed"}
}
}
}'
PUT -XPUT http://192.168.22.143:9200/twitter -H 'Content-Type: application/json' -d
'{
"mappings": {
"tweet": {
"properties": {
"age": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
},
"name": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
}
}
}
}
}'
curl -XPUT http://192.168.22.143:9200/twitter/_mapping/tweet -H 'Content-Type: application/json' -d '{
"mappings": {
"type": {
"properties": {
"publisher": {
"type": "text",
"fielddata": true }
}
}
}
}
}'
PUT twitter
{
"mappings": {
"tweet": {
"properties": {
"age": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
},
"name": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
}
}
}
}
}
添加数据的例子
http://localhost:8081/bulkP?index=red88&type=test&id=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20
http://localhost:8081/searchFilter
打分例子
https://www.programcreek.com/java-api-examples/index.php?api=org.elasticsearch.index.query.functionscore.FunctionScoreQueryBuilder
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-boosting-query.html
http://www.massapi.com/source/github/92/86/928610678/src/test/java/org/elasticsearch/benchmark/scripts/score/BasicScriptBenchmark.java.html#306
https://www.elastic.co/guide/cn/elasticsearch/guide/current/script-score.html
es插件:
https://github.com/medcl/elasticsearch-rtf
es filter 过滤参数
https://stackoverflow.com/questions/34095042/elasticsearch-issue-with-aggregations-along-with-filters
http://teknosrc.com/elasticsearch-use-script-filter-conditon-aggregation-sub-aggreagtion/
http://blog.csdn.net/molong1208/article/details/50589469
http://www.th7.cn/Program/java/201704/1154869.shtml
http://blog.csdn.net/dm_vincent/article/details/42757519
http://cwiki.apachecn.org/display/Elasticsearch/Filters+Aggregation
安装IK分词
https://github.com/medcl/elasticsearch-analysis-ik
curl -XPOST 'http://192.168.22.143:9200/red89/_analyze?pretty' -H 'Content-Type: application/json' -d '
{
"analyzer":"ik_max_word",
"text":"中华人民共和国国歌"
}'
Painless 语言实现打分 ********************
https://www.compose.com/articles/how-to-script-painless-ly-in-elasticsearch/
Elasticsearch 文档专用的更多相关文章
- elasticsearch 文档
elasticsearch 文档 文档格式 索引中最基本的单元叫做文档 document. 在es中文档的示例如下: { "_index": "questions&quo ...
- elasticsearch文档-analysis
elasticsearch文档-analysis analysis 基本概念 全文搜索引擎会用某种算法对要建索引的文档进行分析, 从文档中提取出若干Token(词元), 这些算法称为Tokeniz ...
- elasticsearch文档-modules
elasticsearch文档-modules modules 模块 cluster 原文 基本概念 cluster: 集群,一个集群通常由很多节点(node)组成 node: 节点,比如集群中的每台 ...
- Elasticsearch文档查询
简单数据集 到目前为止,已经了解了基本知识,现在我们尝试用更逼真的数据集,这儿已经准备好了一份虚构的JSON,关于客户银行账户信息的.每个文档的结构如下: { , , "firstname& ...
- ElasticSearch文档操作介绍三
ElasticSearch文档的操作 文档存储位置的计算公式: shard = hash(routing) % number_of_primary_shards 上面公式中,routing 是一个可变 ...
- Elasticsearch入门教程(四):Elasticsearch文档CURD
原文:Elasticsearch入门教程(四):Elasticsearch文档CURD 版权声明:本文为博主原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明. 本文链接: ...
- ElasticSearch文档及分布式文档存储
1.什么是文档? 文档由索引(_index),类型(_type),唯一标识(_id) 组成,我们为 _index(索引) 分配相关逻辑地址分片,该索引下的数据会根据索引以及类型计算哈希来分配数据存储的 ...
- elasticsearch文档学习
1.集群 节点(一个elasticsearch实体) 索引 主节点 :集群级别变更,新增或移除节点,索引: 主节点不参与文档级别搜索和变更. 分片(shard):一个完整的搜索引擎,lucene ...
- ElasticSearch文档
1.什么是文档? 程序中大多的实体或对象能够被序列化为包含键值对的JSON对象,键(key)是字段(field)或属性(property)的名字,值(value)可以是字符串.数字.布尔类型.另一个对 ...
随机推荐
- win7开启特定端口
win7开启特定端口 在xp系统的时代,修改防火墙很方便,很简单.windows7或许是做得过于复杂了.当然所谓安全性也是相当于其他之前版本的系统更高了.为什么要打开端口,肯定是在win ...
- BZOJ 3689: 异或之
字典树可以$o(logn)查找第k大$ 使用$可持久化Trie 区间查找第k大,然后首先把每个数异或之后的最小丢进小根堆中,然后一个一个取出,取出后就再丢次小,一共取k次$ 总的时间复杂度为$O(kl ...
- 8月自动化测试课程 - Selenium开源自动化测试实践
8月自动化测试课程 - Selenium开源自动化测试实践 http://gdtesting.cn/news.php?id=35
- Unity,如何阻塞当前函数一段时间
public class Example : MonoBehaviour { IEnumerator Example() { print(Time.time); ); print(Time.time) ...
- try-catch-finally的问题
参考: https://blog.csdn.net/chengzhezhijian/article/details/17264531 面试一家公司的面试题,注: 那个面试官对这个问题挺看重的(可是我回 ...
- tinyxml优化之二
原文链接:http://www.cnblogs.com/zouzf/p/4216046.html tinyxml优化之一说到了效率在差别有三方面的原因:解析的方式.内存分配(字符串操作).冗余的安全性 ...
- 《Pro Git》第3章 分支
1.分支简介 git保存的不是文件的差异,而是不同时刻的文件快照 git仓库中的对象: commit对象:包含指向前一个commit的指针的所有提交信息 树对象:记录目录结构和blob对象索引 blo ...
- Synchronize原理
1 普通方法上 2 静态方法上 修饰静态方法内置锁是当前的Class字节码对象 修饰普通方法内置锁是当前类的实例 原理与使用: 从字节码层面解释: 执行同步代码块 monitorenter synch ...
- bower安装使用、git安装、node安装、weui安装开发
bower安装使用以及git安装 bower需要:node 和 git 1.Git安装:(选择第二项:Use Git from the Windows Command Prompt)2.node安装: ...
- CentOS 5 上使用yum同时安装32位和64位包的解决方法
在centos上使用yum在线安装软件包的时候,有时候会同时安装32位和64位的包.并且在update的时候也会更新双份. 其实让yum只安装64位的包,只要在 /etc/yum.conf 中加个 e ...