Change cluster name to unique name on same network
D:\Elasticsearch\config\elasticsearch.yml:
cluster.name: nutthaphon
D:\Elasticsearch\start.bat
** Version 1.7.5 support jdk 1.7 only
Ease use on Chrome browser + Sense plugins
Test JSON document via JSON Parser
For thai language, use analyzer=thai
** default thai analyzer from Java, but can be another such as IBM or NECTEC LexTo etc.
POST _search { "query": { "match_all": {} } } GET _aliases DELETE twitter PUT twitter PUT twitter/tweet/1 { "name": "meo", "text" : "สวัสดีชาวโลก" } PUT twitter/tweet/2 { "name":"meo2", "text":"สวัสดีชาวโลก อีกครั้ง" } PUT twitter/tweet/3 { "name":"meo3", "text":"สวัสดีชาวโลก อีกครั้งแล้วเหรอ" } GET twitter GET twitter/_search PUT twitter/tweet/2 { "name" : "somsak", "email" : "somsak@gmail.com", "address" : { "road" :"roadtosomsak", "province": "bangkok" } } GET twitter/tweet/_search?q=meo POST /_search { "query": { "query_string": { "query": "สวัสดีชาวโลก" } } } GET twitter/_search { "query": { "query_string": { "query": "สวัสดีชาวโลก" } } } POST /_search { "query": { "query_string": { "query": "สวัสดีชาวโลก อีกครั้งแล้วเหรอ", "default_operator":"AND" } } } POST /_search { "query": { "query_string": { "query": "meo", "fields": ["name"] } } } POST /_search { "query": { "match": { "name": "meo" } } } GET movie_db/_search GET movie_db/_search { "query": { "match": { "genre": "Action" } } } GET movie_db/_search { "query": { "match": { "genre": "Drama" } } } GET movie_db/_search { "query": { "query_string": { "query": "drama" } } } GET movie_db/_search { "query": { "filtered": { "query": { "query_string": { "query": "Action" } }, "filter": { "range": { "release_year": {"gte":2001}} } } } } GET products/_search POST products/_search { "query": { "filtered": { "query": { "match": { "department_name": "Books" } }, "filter": { "range": { "price": { "gte": 10000 } } } } } } DELETE twitter PUT twitter { "mappings":{ "tweet": { "properties": { "name": { "type": "string" }, "text": { "type": "string", "analyzer":"thai" }, "value": { "type": "long" } } } } } GET twitter PUT twitter/tweet/1 { "name":"meo", "text":"สวัสดีชาวโลก", "value": 10 } PUT twitter/tweet/2 { "name":"meo2", "text":"สวัสดีชาวโลก อีกครั้ง", "value": 20 } PUT twitter/tweet/3 { "name":"meo3", "text":"สวัสดีชาวโลก อีกครั้งแล้วเหรอ", "value": 30 } GET twitter/_search { "query": { "query_string": { "query": "text:สวัสดี", "analyzer": "thai" } } } GET twitter_db/_search GET twitter_db/_search { "query": { "query_string": { "query": "สวัสดี" } } }
Kibana
Home = D:\kibana
run start.bat
http://localhost:5601/
No comments:
Post a Comment