
ES
passer199101
这个作者很懒,什么都没留下…
展开
-
找不到类ImmutableSettings
In ES 2.0, the ImmutableSettings class was indeed removed. This issue mentions it and thebreaking changes documentation for 2.0 also mention it.Instead you can now use Settings.builder() inste原创 2015-12-14 14:32:58 · 6308 阅读 · 3 评论 -
ES批量添加索引
POST /nm_1606/news/_bulk{ "create": { "_id": "20160602060517329146" }}{"click_count": 0,"comment_count": 42, "entity_ids": "13130, 12297, 8220, 13111, 6885, 12717, 13034, 13004, 10936, 3104, 12711原创 2016-06-07 17:33:35 · 3005 阅读 · 0 评论 -
spark查询elasticsearch
下载elasticsearch的spark相关包 https://www.elastic.co/downloads/hadoopimport org.elasticsearch.spark._import org.elasticsearch.spark.sql._import org.apache.spark.SparkConfimport org.apache.spark.SparkCon原创 2016-06-07 18:04:54 · 3383 阅读 · 0 评论 -
elasticsearch配置ik分词器
假定你已经安装了elasticsearch2.1.0和maven, 下面的步骤针对elasticsearch2.1.0有效, 其它版本可能不使用下载ik因为我的elasticsearch是2.1.0,所以去这里下载https://github.com/medcl/elasticsearch-analysis-ik/releases/tag/v1.6.1其它版本的elasticsearch对应的ik去原创 2016-04-29 14:11:26 · 1590 阅读 · 0 评论 -
es 为某个type创建mapping
https://www.elastic.co/guide/en/elasticsearch/guide/current/mapping-intro.htmlPUT /gb/_mapping/tweet{ "properties" : { "tag" : { "type" : "string", "index": "not_analyzed"原创 2016-10-13 15:26:26 · 3322 阅读 · 0 评论 -
spark和elasticsearch的整合
下载jar包 https://www.elastic.co/downloads/hadoop将elasticsearch-spark_2.10-2.4.0.jar加入类路径里面 import org.elasticsearch.spark.sql._ // DataFrame schema automatically inferred val conf原创 2016-10-26 14:11:56 · 3163 阅读 · 0 评论 -
elasticsearch查看所有index
curl 'localhost:9200/_cat/indices?v'原创 2016-10-17 12:18:38 · 62777 阅读 · 0 评论 -
elasticsearch sql的安装
首先参考https://github.com/NLPchina/elasticsearch-sql 有的时候使用上述url中介绍的安装方式安装不上,这个时候就需要手动安装了。 1.下载es-sql 比如我使用的es的版本是2.3.3 https://github.com/NLPchina/elasticsearch-sql/releases/download/2.3.3.0/elastics原创 2016-10-17 12:24:38 · 5908 阅读 · 1 评论 -
elasticsearch sql的使用
先参考https://yq.aliyun.com/articles/60517 编译完之后需要经jar包加入到你的项目还需要三个依赖: <dependency> <groupId>org.elasticsearch</groupId> <artifactId>elasticsearch</artifactId>原创 2016-10-17 20:21:17 · 2175 阅读 · 0 评论 -
使用elasticsearch的index template
静态模板 https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html动态模板PUT /_template/product{ "order": 0, "template": "product*_*", "mappings": { "_default_": {原创 2016-10-18 12:06:31 · 1047 阅读 · 0 评论 -
elasticsearch中的doc_values
PUT/music/_mapping/song{ “properties”: { “tag”: { “type”: “string”, “index”: “not_analyzed”, “doc_values”: true } }}这个就会使用磁盘存储这个字段,而不是存储在内存中原创 2016-10-19 18:26:33 · 2224 阅读 · 0 评论 -
Elasticsearch中的一些知识
index.query.default_field 可以设置默认搜索的字段。详细参考http://stackoverflow.com/questions/10518404/in-elasticsearch-should-we-use-default-field-in-query-string-for-ngram-analyzerindex.mapping.ignore_malformed:全局设置i原创 2016-10-19 19:01:37 · 871 阅读 · 0 评论 -
elasticsearch去重计数(distinct)
http://blog.youkuaiyun.com/jsky_studio/article/details/50783523 http://blog.youkuaiyun.com/dm_vincent/article/details/48039475原创 2017-01-21 16:29:55 · 10352 阅读 · 0 评论 -
使用SQL语法来查询Elasticsearch:Elasticsearch-SQL
http://www.open-open.com/lib/view/open1447747736056.html原创 2017-01-21 16:30:51 · 8269 阅读 · 0 评论 -
elasticsearch中的数据类型
http://blog.youkuaiyun.com/xinguimeng/article/details/50287907原创 2017-01-21 16:32:10 · 4818 阅读 · 0 评论 -
ES内存优化
参考http://elasticsearch.cn/article/32 _optimize 优化前GET _cat/indices/product95_new_users?v\&h=index,docs.count,docs.deleted,store.size,tmproduct95_new_users 203037 24838 326.6mb 1.5mb 优化方法POST product原创 2017-03-20 18:54:00 · 1001 阅读 · 0 评论 -
通过url删除ES中的数据
curl -XDELETE "http://test-hostname:9200/product*_201704*"原创 2017-05-18 14:10:07 · 6301 阅读 · 1 评论 -
Elasticsearch数据重新索引
https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.htmlPOST _reindex{ "source": { "index": "twitter" }, "dest": { "index": "new_twitter", "op_type": "create原创 2017-05-31 14:57:00 · 2566 阅读 · 0 评论 -
ElasticSearch : IN equivalent operator in ElasticSearch
http://stackoverflow.com/questions/30111258/elasticsearch-in-equivalent-operator-in-elasticsearchSimilar to what Chris suggested as a comment, the analogous replacement for IN is the terms filter (quer原创 2016-05-20 16:10:50 · 521 阅读 · 0 评论 -
使用特定analyzer分析文本
使用特定analyzer分析文本curl -XGET 'localhost:9200/_analyze' -d '{ "analyzer" : "standard", "text" : "this is a test"}上边最后可能少了一个单引号使用某个字段的分析器分析文本,这里分别使用tag和tweethttp://es.xiaoleilu.com/052_Mapping_Analys原创 2016-05-02 21:55:14 · 350 阅读 · 0 评论 -
elasticsearch中初步使用filter
使用filter原创 2016-05-02 21:52:42 · 2749 阅读 · 0 评论 -
分布式搜索elasticsearch java API
http://www.nosqldb.cn/1368776304994.html转载 2015-12-14 14:40:26 · 488 阅读 · 0 评论 -
Elasticsearch Reference [2.x] scroll
https://www.elastic.co/guide/en/elasticsearch/reference/2.x/search-request-scroll.htmlhttp://www.jianshu.com/p/14aa8b09c789#原创 2015-12-15 17:38:59 · 384 阅读 · 0 评论 -
Jest is a Java HTTP Rest client for Elasticsearch
https://github.com/searchbox-io/Jest/tree/master/jest转载 2015-12-17 10:08:24 · 1481 阅读 · 0 评论 -
ES 分页查询
http://eggtwo.com/news/detail/147转载 2016-01-04 18:36:14 · 2100 阅读 · 0 评论 -
elasticsearch的store属性跟_source字段
http://m.blog.youkuaiyun.com/blog/jingkyks/41785887转载 2015-12-22 11:42:18 · 1056 阅读 · 0 评论 -
ElasticSearch权威指南
Elasticsearch权威指南 英文原版Elasticsearch权威指南 中文翻译1Elasticsearch权威指南 中文翻译2原创 2016-05-10 18:42:05 · 378 阅读 · 0 评论 -
Elasticsearch 权威指南(中文版)
http://wiki.jikexueyuan.com/project/elasticsearch-definitive-guide-cn/330_Geo_aggs/60_Geo_aggs.html原创 2016-05-10 18:42:38 · 1639 阅读 · 0 评论 -
查询ES中所有index和type的定义
GET _mapping原创 2016-05-10 18:53:36 · 20754 阅读 · 1 评论 -
查询ES中nm_1605 index的定义
GET /nm_1605/_mapping原创 2016-05-10 18:53:55 · 413 阅读 · 0 评论 -
查询ES中nm_1605 index中news type的定义
GET /nm_1605/_mapping/news翻译 2016-05-10 18:54:15 · 508 阅读 · 0 评论 -
elasticsearch查看type的mapping
使用以下方式查看elasticsearch中type的mappingGET /my_index/_mapping/my_type详情请参考https://www.elastic.co/guide/en/elasticsearch/guide/current/mapping-intro.html#_viewing_the_mapping原创 2016-04-29 14:06:56 · 22286 阅读 · 1 评论 -
elasticsearch中给类型增加新字段
https://www.elastic.co/guide/en/elasticsearch/guide/current/_controlling_analysis.htmlFor instance, let’s add a new field to my_index:PUT /my_index/_mapping/my_type{ "my_type": { "properti原创 2016-04-29 14:07:43 · 24944 阅读 · 0 评论 -
elasticsearch依据字段长度过滤
查询title字段的长度小于9的文档GET /nm*/_search{ "query": { "filtered": { "query": { "match": { "title": { "query": "黄晓明和杨颖结婚", "operator": "原创 2016-04-29 14:08:57 · 19012 阅读 · 3 评论 -
es查询的时候控制相似度
详细内容https://www.elastic.co/guide/en/elasticsearch/guide/current/match-multi-word.html#match-precisionGET /nm*/_search{ "query": { "match": { "title": { "query" : "李小冉晒麻雀海报:国家利益高于一原创 2016-04-29 14:09:44 · 10173 阅读 · 2 评论 -
elasticsearch的mapping设置
PUT /my_index{ "mappings": { "my_type": { "properties": { "title": { "type": "string", "index": "analyzed",原创 2016-04-29 14:10:22 · 2640 阅读 · 0 评论 -
ElasticSearch权威指南
Elasticsearch权威指南 英文原版Elasticsearch权威指南 中文翻译1Elasticsearch权威指南 中文翻译2原创 2016-05-02 12:01:15 · 405 阅读 · 0 评论 -
elasticsearch自定义分析器
自定义分词器原创 2016-05-02 21:51:31 · 1149 阅读 · 0 评论 -
安装并运行Elasticsearch
https://www.elastic.co/guide/en/elasticsearch/guide/current/running-elasticsearch.html 安装elasticsearch比较简单,按照上边链接中的描述就行了,关键是如何安装sense.To install and run Sense:Run the following command in the Kibana d原创 2016-05-02 21:56:51 · 1887 阅读 · 0 评论