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. oracle入门(2)—— 使用图形工具navicat for oracle

    [本文介绍] 本文将介绍如何使用图形工具navicat for oracle连接本地数据库 以及远程访问 服务器数据库. [下载地址] http://www.navicat.com.cn/downlo ...

  2. Sql server用QQ邮箱发送邮件

    一.配置数据库邮件 https://jingyan.baidu.com/article/3ea51489a135f752e71bba5b.html

  3. Linux定时器 使用

    1.alarm alarm()执行后,进程将继续执行,在后期(alarm以后)的执行过程中将会在seconds秒后收到信号SIGALRM并执行其处理函数. #include <stdio.h&g ...

  4. Django中间件(含Django运行周期流程图)

    Django中的中间件(含Django完整生命周期图) Django中间件简介 django 中的中间件(middleware),在django中,中间件其实就是一个类,在请求到来和结束后,djang ...

  5. 发布mvc3 遇到的HTTP错误 403.14-Forbidden Web 服务器被配置为不列出此目录的内容

    今天在发布别人提供的MVC3的程序,正常部署后浏览报错,错误内容如图: 根据IIS提供的解决办法,启用目录浏览,刷新页面发现确实不报错了,但页面是以目录显示的,如图 虽然解决了报错问题,但不是正常的效 ...

  6. hadoop nn 运维一例

    nn1 崩溃之后,nn2变为active,但是nn1日志中有异常,处于standby状态的,无法响应读的操作 最后查出原因是因为fensing的问题.

  7. 【Flask】WTForms文件上传下载

    # 文件上传笔记:1. 在模版中,form表单中,需要指定`encotype='multipart/form-data'`才能上传文件.2. 在后台如果想要获取上传的文件,那么应该使用`request ...

  8. jQuery二级下拉菜单

    在线演示 本地下载

  9. java常见异常(更新中)

    Java的异常分为两种,一种是运行时异常(RuntimeException),一种是非运行异常也叫检查式异常(CheckedException) .NullPointerException 空指针异常 ...

  10. xshell 常用命令

    一.grep 命令 (1)命令格式 grep [选项] pattern [file] (2)常用参数 参数 描述 -c 计算找到 '搜寻字符串'(即 pattern) 的次数 -i 忽略大小写的不同, ...