Created
June 25, 2016 11:23
-
-
Save slixurd/7b91056b5fe6ff891f162570a49de5bc to your computer and use it in GitHub Desktop.
This file contains 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
PUT /term_test | |
{ | |
"settings": { | |
"index": { | |
"number_of_shards": 2, | |
"number_of_replicas": 0 | |
} | |
}, | |
"mappings": { | |
"item": { | |
"properties": { | |
"name" : { | |
"type" : "string" | |
}, | |
"tags": { | |
"type": "string", | |
"index": "not_analyzed" | |
}, | |
"id":{ | |
"type": "long" | |
} | |
} | |
} | |
} | |
} | |
POST /term_test/item/2 | |
{ | |
"id": 1, | |
"name": "XXX", | |
"tags": [ | |
"无文字", | |
"恋爱", | |
"冒险" | |
] | |
} | |
POST /term_test/item/1 | |
{ | |
"id": 1, | |
"name": "XXX", | |
"tags": [ | |
"文字", | |
"恋爱", | |
"冒险" | |
] | |
} | |
POST /term_test/item/3 | |
{ | |
"id": 1, | |
"name": "XXX", | |
"tags": [ | |
"A 文字", | |
"恋爱", | |
"冒险" | |
] | |
} | |
POST /term_test/_search | |
{ | |
"query": { | |
"term": { | |
"tags": { | |
"value": "文字" | |
} | |
} | |
} | |
} |
curl -XPOST /term_test/_search -d '{"query": {"term": {"tags": {"value": "文字"}}}}'
在Kibana上可以直接执行
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
请问上面这些测试的内容,有什么工具可以拷贝进去直接执行吗?