Created
October 12, 2016 12:31
-
-
Save up1/a93a414bed6f00a9911952d43f185bf4 to your computer and use it in GitHub Desktop.
Elasticsearch :: Simple Thai Analyzer
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 /twitter | |
PUT /twitter | |
{ | |
"mappings": { | |
"tweet": { | |
"properties": { | |
"message": { | |
"type": "string", | |
"analyzer": "thai", | |
"search_analyzer": "thai" | |
} | |
} | |
} | |
} | |
} | |
GET /twitter | |
POST /twitter/tweet | |
{ | |
"messgae": "ประเทศไทย" | |
} | |
GET /twitter/tweet/_search | |
{ | |
"explain": true | |
} | |
GET /twitter/tweet/_search | |
{ | |
"query": { | |
"match": { | |
"message": "ประเทศ" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment