Elasticsearch with Kibana Development Notes

  • Install

ivan@ivan wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.1.1.deb
ivan@ivan sudo dpkg -i elasticsearch-1.1.1.deb

  • Start

ivan@ivan sudo /etc/init.d/elasticsearch start

  •  Import data into es
ivan@ivan curl -XPUT http://localhost:9200/shakespeare -d '
{
 "mappings" : {
  "_default_" : {
   "properties" : {
    "speaker" : {"type": "string", "index" : "not_analyzed" },
    "play_name" : {"type": "string", "index" : "not_analyzed" },
    "line_id" : { "type" : "integer" },
    "speech_number" : { "type" : "integer" }
   }
  }
 }
}
';

ivan@ivan wget http://www.elasticsearch.org/guide/en/kibana/current/snippets/shakespeare.json shakespeare.json
(put shakespeare.json in currnet dir)

ivan@ivan curl -XPUT localhost:9200/_bulk --data-binary @shakespeare.json
  •  See es data details

access to ‘http://127.0.0.1:9200/

we will see the belowing :

“`

{

  • status: 200,
  • name: “Ebon Seeker”,
  • version:

    {

    • number: “1.1.1”,
    • build_hash: “f1585f096d3f3985e73456debdc1a0745f512bbc”,
    • build_timestamp: “2014-04-16T14:27:12Z”,
    • build_snapshot: false,
    • lucene_version: “4.7”

    },

  • tagline: “You Know, for Search”

}

“`

  • delete datas from es
ivan@ivan curl -XDELETE 'http://localhost:9200/shakespeare/'
  •  Learn about rows and panels

(1) create rows (add a row -> input  -> save), rows look like this :

rows_dark

1> Collapsing rows (blue)

2> Configuring rows (orange)

3> Adding panels (green)

  • Queries and filters

In query line do like this :

(1) via field key words.

*

line_id:24476

speech_number:107

(2) via logical algorithm

duke AND your

(3) search in one range

line_id:[24400 TO 24410] AND text_entry:duke

 

Kibana development demo : https://github.com/IVANOPT/kibana_demo

 

 

 

 

 

发表评论

电子邮件地址不会被公开。 必填项已用*标注

您可以使用这些HTML标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>