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": "文字" | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
在Kibana上可以直接执行