Last active
June 21, 2017 07:29
-
-
Save TomonoriSoejima/9e6c29ba0717c53004c6ac5c99f2d491 to your computer and use it in GitHub Desktop.
testing slow log
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DELETE slow_test | |
PUT /slow_test | |
{ | |
"mappings": { | |
"test": { | |
"properties": { | |
"hotel_name": { | |
"type": "text", | |
"analyzer": "my_analyzer", | |
"fields": { | |
"raw": { | |
"type": "keyword" | |
} | |
} | |
} | |
} | |
} | |
}, | |
"settings": { | |
"analysis": { | |
"analyzer": { | |
"my_analyzer": { | |
"tokenizer": "my_tokenizer" | |
} | |
}, | |
"tokenizer": { | |
"my_tokenizer": { | |
"type": "ngram", | |
"min_gram": 2, | |
"max_gram": 2, | |
"token_chars": [ | |
"letter", | |
"digit" | |
] | |
} | |
} | |
} | |
} | |
} | |
PUT /slow_test/_settings | |
{ | |
"index.search.slowlog.threshold.query.debug": "0ms" | |
} | |
PUT slow_test/test/1 | |
{"hotel_name":"google at 六本木駅"} | |
PUT slow_test/test/2 | |
{"hotel_name":"google at 六本木駅"} | |
PUT slow_test/test/3 | |
{"hotel_name":"六本木駅"} | |
PUT slow_test/test/4 | |
{"hotel_name":"函館ホテル"} | |
PUT slow_test/test/5 | |
{"hotel_name":"ハコダテホテル2"} | |
PUT slow_test/test/6 | |
{"hotel_name":"函館ホテル"} | |
PUT slow_test/test/7 | |
{"hotel_name":"ハコダテホテル"} | |
PUT slow_test/test/8 | |
{"hotel_name":"ハコダテホテル2"} | |
PUT slow_test/test/9 | |
{"hotel_name":"google at 六本木駅"} | |
GET slow_test/_search | |
{ | |
"query": { | |
"match": { | |
"hotel_name": "ホテル" | |
} | |
}, | |
"sort" : [ | |
{"hotel_name.raw" : {"order" : "asc"}} | |
] | |
} | |
PUT /slow_test/_settings | |
{ | |
"index.search.slowlog.threshold.query.trace": "-1" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment