1、elasticsearch是一個基於Lucene的高擴展的分布式搜索服務器,支持開箱即用。
2、elasticsearch隱藏了Lucene的復雜性,對外提供Restful 接口來操作索引、搜索。
突出優點:
1.擴展性好,可部署上百台服務器集群,處理PB級數據。
2.近實時的去索引數據、搜索數據。
es和solr選擇哪個?
1.如果你公司現在用的solr可以滿足需求就不要換了。
2.如果你公司准備進行全文檢索項目的開發,建議優先考慮elasticsearch,因為像Github這樣大規模的搜索都在用它。
刪除索引
curl -XDELETE 'http://10.200.20.20:9200/shenzhenfenhang_fileinfo'
curl -XDELETE 'http://10.200.20.20:9200/shenzhenfenhang_log'
看到下圖就是刪除成功
查詢索引
curl -XGET 'http://10.200.20.20:9200/shenzhenfenhang_log/branchlog/_search?pretty'
查詢索引數目
curl -XGET 'http://10.200.20.20:9200/_cat/indices?pretty'
curl -XGET 'http://10.200.20.20:9200/_cat/indices?v'