什麼是Lucene
Lucene是apache軟體基金會4 jakarta項目組的一個子項目,是一個開放源代碼的全文檢索引擎工具包,即它不是一個完整的全文檢索引擎,而是一個全文檢索引擎的架構,提供了完整的查詢引擎和索引引擎
基本上絕大多數的企業搜尋架構目前都是集中使用Lucene。
什麼是ElasticSearch
ElasticSearch是一個基于Lucene的搜尋伺服器。它提供了一個分布式多使用者能力的全文搜尋引擎,基于RESTful web接口.
ES的好處在于,本身就是為雲及分布式設計,是以整體比較優化。
ElasticSearch 架構(來自兄弟Medcl)

ElasticSearch基本操作
#建立索引
$ curl -XPUT http://localhost:9200/test-index
#建立Mapping
$ curl -XPUT http://localhost:9200/test-index/test-type/_mapping -d '{
"properties" : {
"name" : { "type" : "string" }
}
}'
#索引
$ curl -XPUT http://localhost:9200/test-index/test-type/1 -d '{
"user": "jack",
"post_date": "2015-11-15 13:12:00",
"message": "Trying out elasticsearch, so far so good?"
}'
#擷取
$ curl -XGET http://localhost:9200/test-index/test-type/1
#删除
$ curl -XDELETE 'http://localhost:9200/test-index/test-type/1'
ES本身也提供非常豐富的叢集部署及相關的軟體,大家可以進一步去擷取相關的資源進行學習。
另外也重磅介紹ES中文社群http://elasticsearch.cn/?/explore/
社群的建設者Medcl是我們非常好的朋友,一起合作了很多事情。
更多精彩内容請關注
訂閱号:圖靈搜尋,一個隻為程式員的知識庫服務,另外請大家使用https://www.tulingss.com 一個程式的搜尋服務