http://blog.csdn.net/dm_vincent/article/details/46996021
https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-update-settings.html
https://elasticsearch.cn/question/2158
一。没有index数据时候方法:
1.后台创建空的index
2.配置analysis
执行以下:
特别注意:analysis中引用test,例如: userdict_ja.txt 如果太大,后边是没办法open的。
curl -XPOST 'localhost:9220/lbsindex/_close?pretty'
curl -XPUT 'localhost:9220/lbsindex/_settings?pretty' -H 'Content-Type: application/json' -d'
{"analysis":{
"filter":{
"stopword_dict":{
"type": "stop",
"stopwords_path": "stopword.txt"
},
"stopword_dict2":{
"type": "stop",
"stopwords": "_english_"
},
"katakana_stemmer":{
"type": "kuromoji_stemmer",
"minimum_length": 4
},
"whitespace_remove": {
"type": "pattern_replace",
"pattern": " ",
"replacement": ""
},
"filter_length": {
"type": "length",
"min": 1
}
},
"tokenizer":{
"kuromoji_user_dict": {
"type": "kuromoji_tokenizer",
"mode": "search",
"discard_punctuation": "false",
"user_dictionary": "userdict_ja.txt"
}
},
"analyzer":{
"myanalyzer":{
"type": "custom",
"tokenizer": "kuromoji_user_dict",
"filter": ["kuromoji_baseform","lowercase","stopword_dict","stopword_dict2","katakana_stemmer","cjk_width","whitespace_remove","filter_length"]
}
}
}
}'
curl -XPOST 'localhost:9220/lbsindex/_open?pretty'
#强制open:curl -i -XPOST 'http://localhost:9200/megacorp/_open/?pretty'
3.后台put_mapping
二。存在index数据的情况下:
https://www.elastic.co/blog/changing-mapping-with-zero-downtime
常用操作:
查看setings:
curl -XGET "localhost:9220/lbsindex/_settings?pretty"
查看mapping
curl -XGET "localhost:9220/lbsindex/item/_mapping?pretty"
添加mappings:
curl -XPUT localhost:9220/lbsindex/_mapping/item -H 'Content-Type: application/json' -d'
{
"mappings":{
"item" : {
"properties" : {
"geo": {
"properties": {
"location": {
"type": "geo_point"
}
}
}
}
}
}
}'
添加字段:
curl -XPUT 'http://localhost:9220/test-index/_mapping/logs_june' -d '
{
"logs_june" : {
"properties" : {
"message" : {"type" : "string", "store" : true }
}
}
}
'
分享到:
相关推荐
(狂神)ElasticSearch快速入门笔记,ElasticSearch基本操作以及爬虫(Java-ES仿京东实战),包含了小狂神讲的东西,特别适合新手学习,笔记保存下来可以多看看。好记性不如烂笔头哦~,ElasticSearch,简称es,es是一个...
elasticsearch elasticsearch-6.2.2 elasticsearch-6.2.2.zip 下载
You will install and set up Elasticsearch and its related plugins, and handle documents using the Distributed Document Store. You will see how to query, search, and index your data, and perform ...
分享一套完整版视频课程——分布式搜索引擎Elasticsearch开发实战基础篇 (ElasticSearch、ELK、搜索引擎、Lucene),本教程旨在带领大家进入搜索引擎领域...Elasticsearch索引和Mapping Elasticsearch搜索深入 Elastic
ElasticSearch映射生成器该工具允许在创建索引时为索引生成映射或设置。 使用注释描述定义的映射字段安装二进制文件部署在Maven Central上,您可以将工件导入到您的项目中: < dependency> < groupId>...
After creating complex queries and analytics, mapping, aggregation, and scripting, you will master the integration of ElasticSearch's functionality in user-facing applications and take your knowledge ...
详细讲述了Elasticsearch从安装、下载、使用
arcgis elasticSearch es 矢量数据导入插件 数据建模 mapping indexsetting 字段映射 索引建模支持geoshape、shape,text索引支持keyword/ngram/edgeNgram/ikSmart,快速导入,兼容multipolygon,带洞,多面,使用时...
适用于7.17.1系列,例如Elasticsearch的7.17.12版本。 elasticsearch-analysis-ik 是一个常用的中文分词器,在 Elasticsearch 中广泛应用于中文文本的分析和搜索。下面是 elasticsearch-analysis-ik 分词器的几个...
elasticsearch-8.2.3 windows 版本。 Elasticsearch是一个基于Lucene的搜索服务器。它提供了一个分布式多用户能力的全文搜索引擎,基于RESTful web接口。Elasticsearch是用Java语言开发的,并作为Apache许可条款下的...
Understand common performance and reliability pitfalls in ElasticSearch Use popular monitoring tools such as ElasticSearch-head, BigDesk, Marvel, Kibana, and more This is a step-by-step guide with ...
一、概述 一般来说我们开发Elasticsearch会选择...2、elasticsearch-head (方便查看ES中的索引及数据) 3、Kibana(方便开发通过rest api 调试ES,有代码提示) 4、中文分词elasticsearch-analysis-ik (ik) 1、下载ela
elasticsearch-7.17.6及对应版本IK分词 适合人群:elasticsearch初学者 Elasticsearch 是位于 Elastic Stack 核心的分布式搜索和分析引擎。Logstash 和 Beats 有助于收集、聚合和丰富您的数据并将其存储在 Elastic...
赠送jar包:elasticsearch-6.8.3.jar; 赠送原API文档:elasticsearch-6.8.3-javadoc.jar; 赠送源代码:elasticsearch-6.8.3-sources.jar; 赠送Maven依赖信息文件:elasticsearch-6.8.3.pom; 包含翻译后的API文档...
In this book, you'll learn to use Elasticsearch, Kibana and Elasticsearch-Hadoop effectively to analyze and understand your HDFS and streaming data. You begin with an in-depth understanding of the ...
docker run --name elasticsearch7.16.3 -p 127.0.0.1:9200:9200 -p 127.0.0.1:9300:9300 -e "discovery.type=single-node" -v /Users/xingyue/Home/xingyue/学习/工程化/es/elasticsearch.yml:/usr/share/elastic...
Harness the power of ElasticSearch to build and manage scalable search and analytics solutions with this fast-paced guide About This Book New to ElasticSearch? Here's what you need―a highly ...
Elasticsearch is one of the most powerful solution, written with the cloud and distributed computing in mind. Its main author, Shay Banon, famous for having developed Compass ...
ElasticSearch是一个基于...09_Elasticsearch 如何做映射mapping 10_Elasticsearch 基本查询 11_Elasticsearch filter查询 12_Elasticsearch 组合查询 13_Logstash 介绍以及初步安装 14_Logstash 配置语法以及插件
You will see how to install Elasticsearch and Kibana and learn how to index and update your data. We will use an e-commerce site as an example to explain how a search engine works and how to query ...