summaryrefslogtreecommitdiff
path: root/elasticsearch/mappings.json
diff options
context:
space:
mode:
Diffstat (limited to 'elasticsearch/mappings.json')
-rw-r--r--elasticsearch/mappings.json65
1 files changed, 65 insertions, 0 deletions
diff --git a/elasticsearch/mappings.json b/elasticsearch/mappings.json
new file mode 100644
index 0000000000..654ab17450
--- /dev/null
+++ b/elasticsearch/mappings.json
@@ -0,0 +1,65 @@
+{
+ "settings": {
+ "analysis": {
+ "analyzer": {
+ "bigram": {
+ "tokenizer": "bigram_tokenizer"
+ }
+ },
+ "tokenizer": {
+ "bigram_tokenizer": {
+ "type": "nGram",
+ "min_gram": 2,
+ "max_gram": 2,
+ "token_chars": [
+ "letter",
+ "digit"
+ ]
+ }
+ }
+ }
+ },
+ "mappings": {
+ "user": {
+ "properties": {
+ "username": {
+ "type": "string",
+ "index": "analyzed",
+ "analyzer": "bigram"
+ },
+ "name": {
+ "type": "string",
+ "index": "analyzed",
+ "analyzer": "bigram"
+ },
+ "bio": {
+ "type": "string",
+ "index": "analyzed",
+ "analyzer": "kuromoji"
+ }
+ }
+ },
+ "post": {
+ "properties": {
+ "text": {
+ "type": "string",
+ "index": "analyzed",
+ "analyzer": "kuromoji"
+ }
+ }
+ },
+ "drive_file": {
+ "properties": {
+ "name": {
+ "type": "string",
+ "index": "analyzed",
+ "analyzer": "kuromoji"
+ },
+ "user": {
+ "type": "string",
+ "index": "not_analyzed"
+ }
+ }
+ }
+ }
+}