摘要:前面我们感觉ES就想是一个nosql数据库,支持Free Schema。接触过Lucene、solr的同学这时可能会思考一个问题——怎么定义document中的field?store、index、analyzer等属性如何配置?这时可以了解下ES中的Mapping。[reference]http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping.html#mappingMapping is the process of defining how a document should be mapped
阅读全文
02 2014 档案
摘要:es有很多特性,分布式、副本集、负载均衡、容灾等。我们先搭建一个很简单的分布式集群(伪),在同一机器上配置三个es,配置分别如下:cluster.name: foxClusternode.name: "fox"cluster.name: foxClusternode.name: "fox2"transport.tcp.port: 9302http.port: 9202cluster.name: foxClusternode.name: "fox3"transport.tcp.port: 9303http.port: 9203加入一些数
阅读全文
摘要:上一篇(elasticsearch 口水篇(3)java客户端 - Jest)Jest是第三方客户端,基于REST Api进行调用(httpClient),本篇简单介绍下elasticsearch原生的java客户端。具体参考:http://www.elasticsearch.org/guide/e...
阅读全文
摘要:elasticsearch有丰富的客户端,java客户端有Jest。其原文介绍如下:Jestis a Java HTTP Rest client for ElasticSearch.It is actively developed and tested by Searchly.A sample Java application using Jest can be found on GitHubhttps://github.com/searchbox-io/java-jest-sample.[http://www.searchly.com/documentation/developer-api-
阅读全文
摘要:Sense为了方便、直观的使用es的REST Api,我们可以使用sense。Sense是Chrome浏览器的一个插件,使用简单。如图:Sense安装:https://chrome.google.com/webstore/detail/sense/doinijnbnggojdlcjifpdckfokbbfpbo或者直接去chrome网上应用店搜索安装。CRUDURL的格式:http://localhost:9200///[]其中index、type是必须提供的。id是可选的,不提供es会自动生成。index、type将信息进行分层,利于管理。index可以理解为数据库,type理解为数据表。补
阅读全文
摘要:一)安装elasticsearch1)下载elasticsearch-0.90.10,解压,运行\bin\elasticsearch.bat (windwos)2)进入http://localhost:9200/如下图安装成功!二)插件——headelasticsearch-head是一个elasticsearch的集群管理工具,它是完全由html5编写的独立网页程序,你可以通过插件把它集成到es。安装命令:\bin>plugin -install mobz/elasticsearch-head安装完成后\plugins目录下会有head的文件夹。进入http://localhost:9
阅读全文
摘要:2014年,开始对ES边学边记录。一)口水篇elasticsearch 口水篇(1) 安装、插件elasticsearch 口水篇(2)CRUDelasticsearch 口水篇(3)java客户端 - Jestelasticsearch 口水篇(4)java客户端 - 原生esClientelasticsearch 口水篇(5)es分布式集群初探二)原理三)源码四)优化五)经验总结
阅读全文