ES相关API备忘(一)
来源:互联网 发布:网络黑名单 编辑:程序博客网 时间:2024/06/07 09:25
查看所有节点: http://localhost:9200/_cat/nodes?v
查看当前索引数据: http://localhost:9200/myindex/_search?pretty -d
当前mapping: http://localhost:9200/myindex/_mapping
测试分词:http://localhost:9200/myindex/_analyze?pretty&analyzer=ik_smart&text=com.test.123中文 abc ddd (ik_max_word ik_smart)
删除索引: curl -XDELETE'http://localhost:9200/myindex
创建索引:curl -XPUT http://10.20.26.119:9200/pafa5log -d '
{
"settings": {
"analysis": {
"analyzer": {
"optimizeIK": {
"type": "custom",
"tokenizer": "ik_max_word",
"filter": [
"stemmer"
]
}
}
}
}}'
直接在linux命令下执行。或存成文件 执行
创建表结构:
curl -XPOST http://localhost:9200/myindex/loginfo/_mapping -d'{
"loginfo": {
"_all": {
"analyzer": "optimizeIK",
"search_analyzer": "optimizeIK",
"term_vector": "no", "store": "false"
},
"_ttl" : {
"enabled" : true, "default" : "3d"
},
"properties": {
"contextStack":{
"type": "string", "store": "no",
"analyzer": "ik_smart", "search_analyzer": "ik_smart",
"include_in_all": "true"
},
"appName": {
"type": "string", "store": "no",
"index": "not_analyzed",
"include_in_all": "false"
},
"instanceIp": {
"type": "string", "store": "no",
"index": "not_analyzed",
"include_in_all": "false"
},
"loggerName": {
"type": "string", "store": "no",
"analyzer": "optimizeIK", "search_analyzer": "optimizeIK",
"include_in_all": "true"
},
"millis": {
"type": "string", "store": "no",
index: "not_analyzed",
"include_in_all": "true"
},
"level": {
"type": "string", "store": "no",
"index": "not_analyzed",
"include_in_all": "false"
},
"message": {
"type": "string", "store": "no",
"analyzer": "ik_smart", "search_analyzer": "ik_smart",
"include_in_all": "true"
},
"thrown": {
"type": "string", "store": "no",
"index": "not_analyzed",
"include_in_all": "true"
}
}
}
}
}'
- ES相关API备忘(一)
- ES 批量bulk 备忘
- javascript字符串相关api(一)
- 相关备忘
- OPenGL ES常用API:
- OpenGL ES常用API
- OpenGL ES常用API
- OpenGL ES常用API
- OpenGL ES常用API
- es Update API
- ES java api
- opengl es API文档
- ES java api
- es restful api
- ES Java api
- ES Java API
- ES Java API
- ES Java API
- 数据怎么存入MongoDB
- synchronized
- 如何制作表格(一)——TableLayout
- caffe研究之Imagenet的train_val.prototxt解读
- 百度面试总结2
- ES相关API备忘(一)
- eclipse 找不到类
- 每日趣闻项目小结
- Servlet-02
- CentOS安装FastDFS+Nginx
- 自定义时钟
- 为什么上传文件的表单里面要加一个属性enctype=multipart/form-data?
- JavaEE项目实战(OA系统)之二十一_流程审批之四
- Qt5下OpenGL程序的新写法