Elasticsearchとはなにか的な
どうやって使うの的な
- インストールする
- 起動する
- デフォでバックグラウンド起動っぽい。もち、フォアグラウンドで立てることもできる
- 叩く
- ラッパーなど
- 各言語でこのAPIのラッパーがあったりする
- たとえばGo言語 Elasticsearch client for Google Go. : golang
インストールのメモ (MacOSX)
% brew search elasticsearch elasticsearch % brew install elasticsearch elasticsearch: Java 1.7 is required to install this formula. You can install Java from: http://www.oracle.com/technetwork/java/javase/downloads/index.html Make sure you install both the JRE and JDK. Error: An unsatisfied requirement failed this build.
言われた通り、Java SE - Downloads | Oracle Technology Network | Oracleここ行ってJavaを最新版にする
% brew install elasticsearch ==> Downloading https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.4.2.tar.gz ######################################################################## 100.0% ==> Caveats Data: /usr/local/var/elasticsearch/elasticsearch_otiai10/ Logs: /usr/local/var/log/elasticsearch/elasticsearch_otiai10.log Plugins: /usr/local/var/lib/elasticsearch/plugins/ To have launchd start elasticsearch at login: ln -sfv /usr/local/opt/elasticsearch/*.plist ~/Library/LaunchAgents Then to load elasticsearch now: launchctl load ~/Library/LaunchAgents/homebrew.mxcl.elasticsearch.plist Or, if you don't want/need launchctl, you can just run: elasticsearch --config=/usr/local/opt/elasticsearch/config/elasticsearch.yml ==> Summary 🍺 /usr/local/Cellar/elasticsearch/1.4.2: 35 files, 29M, built in 15 seconds
launchは明示的でいいので、plistべつにほげほげしない。
% elasticsearch -h Usage: /usr/local/bin/elasticsearch [-d] [-h] [-p pidfile]
ウッ、ぜんぜんヘルプしてくれない
まあ言われた通り
% elasticsearch --config=/usr/local/opt/elasticsearch/config/elasticsearch.yml
Elasticsearch クイックスタート — Hello! Elasticsearch. — Medium
http用のデフォルトポートは9200らしい
別端末から
% curl :9200 { "status" : 200, "name" : "Orbit", "cluster_name" : "elasticsearch_otiai10", "version" : { "number" : "1.4.2", "build_hash" : "927caff6f05403e936c20bf4529f144f0c89fd8c", "build_timestamp" : "2014-12-16T14:11:12Z", "build_snapshot" : false, "lucene_version" : "4.10.2" }, "tagline" : "You Know, for Search" }
なるほど動いてる
参考になるかもしれない
- Elasticsearch.org Open Source Distributed Real Time Search & Analytics | Elasticsearch 公式
- 実践!Elasticsearch - Wantedly Engineer Blog
- 「関連する○○」機能を手軽に実現できる。そう、Elasticsearch ならね。 - クックパッド開発者ブログ
- ビッグデータ処理の常識をJavaで身につける(1):検索エンジンの常識をApache Solrで身につける (1/4) - @IT 参考 Solr
- 国産の全文検索エンジンGroonga vs 世界的流行のElasticsearch - CreateField Blog 参考 Groonga
- ElasticSearchの運用とか (1) - なんかかきたい
- ElasticsearchのインストールとCSVからのデータ挿入 | EasyRamble
高速スケーラブル検索エンジン ElasticSearch Server (アスキー書籍)
- 作者: Rafal Kuc (lにストローク符号、cにアクサン・テギュ付く),Marek Rogozinski (nにアクサン・テギュ付く)
- 出版社/メーカー: KADOKAWA / アスキー・メディアワークス
- 発売日: 2014/03/25
- メディア: Kindle版
- この商品を含むブログ (3件) を見る
Apache Solr入門 ―オープンソース全文検索エンジン
- 作者: 関口宏司,三部靖夫,武田光平,中野猛,大谷純
- 出版社/メーカー: 技術評論社
- 発売日: 2010/02/20
- メディア: 大型本
- 購入: 18人 クリック: 567回
- この商品を含むブログ (22件) を見る