Last active
May 3, 2019 07:29
-
-
Save binhqd/c0e2ddec53e8fc3d55bde6dcbe31ef48 to your computer and use it in GitHub Desktop.
Elasticsearch classification
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
{ | |
"settings": { | |
"index": { | |
"analysis": { | |
"analyzer" : { | |
"romaji_analyzer" : { | |
"tokenizer" : "kuromoji_tokenizer", | |
"filter" : ["romaji_readingform"] | |
}, | |
"katakana_analyzer" : { | |
"tokenizer" : "kuromoji_tokenizer", | |
"filter" : ["katakana_readingform"] | |
} | |
}, | |
"filter" : { | |
"romaji_readingform" : { | |
"type" : "kuromoji_readingform", | |
"use_romaji" : true | |
}, | |
"katakana_readingform" : { | |
"type" : "kuromoji_readingform", | |
"use_romaji" : false | |
} | |
} | |
} | |
} | |
}, | |
"mappings": { | |
"_doc": { | |
"properties":{ | |
"last_modified": { | |
"type": "date" | |
}, | |
"content_en":{ | |
"type":"text", | |
"term_vector": "yes", | |
"analyzer":"english" | |
}, | |
"content_ja":{ | |
"type":"text", | |
"term_vector": "yes", | |
"analyzer":"katakana_analyzer" | |
}, | |
"category":{ | |
"type":"keyword" | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment