Initial commit 🍀
This commit is contained in:
commit
b3f42e62af
405 changed files with 31017 additions and 0 deletions
6
elasticsearch/README.md
Normal file
6
elasticsearch/README.md
Normal file
|
@ -0,0 +1,6 @@
|
|||
How to create indexes
|
||||
=====================
|
||||
|
||||
``` shell
|
||||
curl -XPOST localhost:9200/misskey -d @path/to/mappings.json
|
||||
```
|
65
elasticsearch/mappings.json
Normal file
65
elasticsearch/mappings.json
Normal file
|
@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue