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 文档专用的更多相关文章

  1. elasticsearch 文档

    elasticsearch 文档 文档格式 索引中最基本的单元叫做文档 document. 在es中文档的示例如下: { "_index": "questions&quo ...

  2. elasticsearch文档-analysis

    elasticsearch文档-analysis   analysis 基本概念 全文搜索引擎会用某种算法对要建索引的文档进行分析, 从文档中提取出若干Token(词元), 这些算法称为Tokeniz ...

  3. elasticsearch文档-modules

    elasticsearch文档-modules modules 模块 cluster 原文 基本概念 cluster: 集群,一个集群通常由很多节点(node)组成 node: 节点,比如集群中的每台 ...

  4. Elasticsearch文档查询

    简单数据集 到目前为止,已经了解了基本知识,现在我们尝试用更逼真的数据集,这儿已经准备好了一份虚构的JSON,关于客户银行账户信息的.每个文档的结构如下: { , , "firstname& ...

  5. ElasticSearch文档操作介绍三

    ElasticSearch文档的操作 文档存储位置的计算公式: shard = hash(routing) % number_of_primary_shards 上面公式中,routing 是一个可变 ...

  6. Elasticsearch入门教程(四):Elasticsearch文档CURD

    原文:Elasticsearch入门教程(四):Elasticsearch文档CURD 版权声明:本文为博主原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明. 本文链接: ...

  7. ElasticSearch文档及分布式文档存储

    1.什么是文档? 文档由索引(_index),类型(_type),唯一标识(_id) 组成,我们为 _index(索引) 分配相关逻辑地址分片,该索引下的数据会根据索引以及类型计算哈希来分配数据存储的 ...

  8. elasticsearch文档学习

    1.集群 节点(一个elasticsearch实体)  索引  主节点 :集群级别变更,新增或移除节点,索引:  主节点不参与文档级别搜索和变更. 分片(shard):一个完整的搜索引擎,lucene ...

  9. ElasticSearch文档

    1.什么是文档? 程序中大多的实体或对象能够被序列化为包含键值对的JSON对象,键(key)是字段(field)或属性(property)的名字,值(value)可以是字符串.数字.布尔类型.另一个对 ...

随机推荐

  1. 【Java编程】写入、读取、遍历Properties文件

    在Java开发中通常我们会存储配置參数信息到属性文件.这种属性文件能够是拥有键值对的属性文件,也能够是XML文件.关于XML文件的操作,请參考博文[Java编程]DOM XML Parser 解析.遍 ...

  2. 维多利亚的秘密 golang入坑系列

    原文在gitbook,字字原创,版权没有,转载随意. 在写本文的前一天,2017维密在上海开始了. 为了纪念屌丝界的盛世,特为本节起名维多利亚的秘密.现在的社会,要想出名只有抓眼球.所以写份技术文章, ...

  3. I2C通信

    项目之前研究了I2C通信协议的实现,完成FPGA对视频解码芯片SAA7111A的初始化配置,设计实现了I2C主机对从机(SAA7111A)32个寄存器的写操作,因此只简单实现了I2C的写时序. 这次重 ...

  4. C/C++中的行读取

    在C语言里面一直很容易混淆的,gets和fgetS的区别: char * fgets ( char * str, int num, FILE * stream ); Reads characters ...

  5. linux 或c 时间相关处理类型和函数

    注意1.精确级别,纳秒级别原型long  clock_gettime (clockid_t which_clock, struct timespec *tp); 头文件time.hwhich_cloc ...

  6. beego——获取参数

    1.获取参数 我们经常需要获取用户传递的数据,包括Get.POST等方式的请求,beego里面会自动解析这些数据,你可以通过如下方式获取数据: GetString(key string) string ...

  7. ThinkPHP框架基础知识三

    一.JS文件与Css文件存放位置 其实JS与Css文件放在任意位置都可以找到,只要路径正确就行. 在TP框架中我们访问的所有文件都要走入口文件index.php,相当于访问的是index.php页面. ...

  8. HDOJ 1501 Zipper 【DP】【DFS+剪枝】

    HDOJ 1501 Zipper [DP][DFS+剪枝] Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Ja ...

  9. redis 学习笔记(二)

    1. 在centos下安装g++,如果输入 yum install g++,那么将会提示找不到g++.因为在centos下g++安装包名字叫做:gcc-c++ 所以应该输入 yum install g ...

  10. DATEDIFF() 返回2个日期之间的间隔

    SELECT DATEDIFF(day,'2008-12-29','2008-12-30') AS DiffDate 解释: 第一个参数 day 表示 返回2个日期间隔的 个间隔类型 是 日期:结果 ...