es操作记录
来源:互联网 发布:cf冰域炸服器软件 编辑:程序博客网 时间:2024/04/29 06:33
创建索引及mapping
curl -XPUT "http://192.168.5.101:9500/productindex" -d '{"settings" : { "index": { "analysis": { "analyzer": { "kw": { "tokenizer": "mt", "filter": [ "lowercase", "unique" ] }, "cn": { "tokenizer": "ik", "filter": [ "lowercase", "unique" ] } }, "tokenizer": { "mt": { "type": "pattern", "pattern": "`" } } } } }, "mappings" : { "productindex" : { "properties" : { "activities" : { "type" : "string", "analyzer" : "whitespace", "store" : "yes" }, "area" : { "type" : "string", "analyzer" : "ik", "store" : "yes" }, "attrIds" : { "type" : "string", "analyzer" : "whitespace", "store" : "yes" }, "attrStrs" : { "type" : "string", "analyzer" : "whitespace", "store" : "yes" }, "attrValues" : { "type" : "string", "analyzer" : "whitespace", "store" : "yes" }, "c1" : { "type" : "string", "index" : "not_analyzed", "store" : "yes", "omit_norms" : true, "index_options" : "docs" }, "c2" : { "type" : "string", "index" : "not_analyzed", "store" : "yes", "omit_norms" : true, "index_options" : "docs" }, "c3" : { "type" : "string", "index" : "not_analyzed", "store" : "yes", "omit_norms" : true, "index_options" : "docs" }, "c4" : { "type" : "string", "index" : "not_analyzed", "store" : "yes", "omit_norms" : true, "index_options" : "docs" }, "canbuy" : { "type" : "integer", "store" : "yes" }, "comId" : { "type" : "long", "store" : "yes" }, "companyName" : { "type" : "multi_field", "fields" : { "index" : { "type" : "string", "analyzer" : "ik", "include_in_all" : false }, "noindex" : { "type" : "string", "index" : "not_analyzed", "omit_norms" : true, "index_options" : "docs", "include_in_all" : false } } }, "cost" : { "type" : "string", "index" : "no", "store" : "yes" }, "createTime" : { "type" : "string", "index" : "not_analyzed", "store" : "yes", "omit_norms" : true, "index_options" : "docs" }, "evaluate" : { "type" : "integer", "store" : "yes" }, "funcIds" : { "type" : "string" }, "id" : { "type" : "string", "index" : "not_analyzed", "store" : "yes", "omit_norms" : true, "index_options" : "docs" }, "imgNum" : { "type" : "integer", "store" : "yes" }, "imgs" : { "type" : "string", "index" : "no", "store" : "yes" }, "intro" : { "type" : "string", "index" : "no", "store" : "yes" }, "keyword" : { "type" : "string", "index" : "not_analyzed", "store" : "yes", "omit_norms" : true, "index_options" : "docs" }, "kw_search" : { "type" : "string", "analyzer" : "kw", "store" : "yes" }, "level" : { "type" : "integer", "store" : "yes" }, "mainProducts" : { "type" : "string", "analyzer" : "ik", "store" : "yes" }, "manage" : { "type" : "string", "index" : "not_analyzed", "store" : "yes", "omit_norms" : true, "index_options" : "docs" }, "myscore" : { "type" : "integer", "store" : "yes" }, "myscore2" : { "type" : "double" }, "vipscore" : { "type" : "string", "analyzer" : "whitespace", "store" : "yes" }, "oauth" : { "type" : "string", "analyzer" : "whitespace", "store" : "yes" }, "openTime" : { "type" : "long" }, "phone" : { "type" : "string" }, "price" : { "type" : "double", "store" : "yes" }, "refreshDay" : { "type" : "string", "index" : "not_analyzed", "store" : "yes", "omit_norms" : true, "index_options" : "docs" }, "refreshTime" : { "type" : "string", "index" : "not_analyzed", "store" : "yes", "omit_norms" : true, "index_options" : "docs" }, "sale" : { "type" : "integer", "store" : "yes" }, "simgs" : { "type" : "string", "index" : "no", "store" : "yes" }, "sort" : { "type" : "long" }, "startNum" : { "type" : "integer", "store" : "yes" }, "tags" : { "type" : "string", "index" : "not_analyzed", "store" : "yes" }, "title" : { "type" : "string", "analyzer" : "cn", "store" : "yes" }, "userId" : { "type" : "long" }, "username" : { "type" : "string", "index" : "not_analyzed", "store" : "yes", "omit_norms" : true, "index_options" : "docs" }, "vip" : { "type" : "integer", "store" : "yes" } } } }}';
删除索引
curl -XDELETE http://localhost:9500/productindex/productindex
设置别名
curl -XPOST 'http://localhost:9500/_aliases' -d ' { "actions": [ {"remove": {"index": "productindex-v1", "alias": "productindex"}}, {"add": {"index":"productindex-v2", "alias": "<span style="font-family:Arial, Helvetica, sans-serif;">productindex</span>"}} ] }'
0 0
- es操作记录
- ES记录
- es 记录
- ES记录
- ES错误记录
- ES常用命令记录
- ES 对各字段创建分词 和mapping创建 个人操作记录
- ES插入更新操作
- java 操作ES
- ES基础操作
- Java操作ES
- ES合并操作小结
- 【OpenGL ES】片段操作
- [es]perl操作es中文处理
- OPENGL ES 常用API记录
- logstash学习记录(es)
- es curator安装使用记录
- OpenGL ES 模型视图操作
- Axure RP 7.0 注册码
- wamp中mysql远程访问问题
- 51nod1344 走格子
- 项目管理体会
- 二叉树
- es操作记录
- Python——类的高级主题
- 页面跳转改变nav效果
- 优化系列 | 实例解析MySQL性能瓶颈排查定位
- 单例设计模式
- 一张图片的2D to 3D过程
- “百脑虫”手机病毒分析报告
- 第四次CCF计算机软件能力认证考试题解(Java)--201503--节日--100分通过
- 启动页图片尺寸