Elasticsearch を使ってみる on Windows

とりあえずメモ。

前提

  • Windows 7 Professional SP1 64bit
  • Elasticsearch 2.3.4

インストール/起動

Download Elasticsearch Free • Get Started Now | Elastic

  1. ZIP をダウンロードして展開
  2. bin/elasticsearch.bat を実行

使ってみる

GitHub - elastic/elasticsearch: Open Source, Distributed, RESTful Search Engine

↑のチュートリアルを参考に使ってみる。

尚、すべてのツイートを検索するには /twitter/tweet/_search"match_all":{} のクエリでリクエストするように書いてあるが、単純に GET するだけでよさそう。

elasticsearch-head

Elasticsearch の GUI コンソール

  1. bin/plugin.bat install mobz/elasticsearch-head を実行
    (プロキシ環境の場合は -DproxyHost=hostname -DproxyPort=port を付ける)
  2. ブラウザから http://localhost:9200/_plugin/head/ にアクセス