Commit d7bb1694 by Sxy

fix: 文档

parent bbfae147
实现商标近似查询
\ No newline at end of file
#### 商标索引结构
```json
{
"settings": {
"number_of_shards": 1,
"number_of_replicas": 0,
"analysis": {
"analyzer": {
"shouzimu_pinyin": {
"tokenizer": "shouzimu_pinyin"
},
"all_pinyin": {
"tokenizer": "all_pinyin"
},
"xingjinzi": {
"char_filter": [
"fantizi"
],
"tokenizer": "standard",
"filter": [
"lowercase",
"xingjinzi"
]
},
"tongyici": {
"char_filter": [
"fantizi"
],
"tokenizer": "ik_max_word",
"filter": [
"lowercase",
"tongyici"
]
},
"jingque": {
"char_filter": [
"fantizi"
],
"tokenizer": "keyword",
"filter": [
"lowercase"
]
},
"mypattern": {
"char_filter": [
"fantizi"
],
"tokenizer": "mypattern",
"filter": [
"lowercase"
]
}
},
"filter": {
"xingjinzi": {
"type": "synonym",
"synonyms_path": "xingjinzi.txt"
},
"tongyici": {
"type": "synonym",
"synonyms_path": "tongyici.txt"
}
},
"tokenizer": {
"shouzimu_pinyin": {
"type": "pinyin",
"keep_first_letter": true,
"keep_full_pinyin": false
},
"all_pinyin": {
"type": "pinyin",
"keep_first_letter": false,
"keep_joined_full_pinyin": true,
"keep_none_chinese_in_joined_full_pinyin": true
},
"mypattern": {
"type": "pattern",
"pattern": ","
}
},
"char_filter": {
"fantizi": {
"type": "stconvert",
"convert_type": "t2s"
}
}
}
},
"mappings": {
"properties": {
"name": {
"type": "keyword",
"fields": {
"standard": {
"type": "text",
"analyzer": "standard",
"search_analyzer": "standard"
},
"jingque": {
"type": "text",
"analyzer": "jingque",
"search_analyzer": "jingque"
},
"english": {
"type": "text",
"analyzer": "english",
"search_analyzer": "english"
},
"all_pinyin": {
"type": "text",
"analyzer": "all_pinyin",
"search_analyzer": "all_pinyin"
},
"xingjinzi": {
"type": "text",
"analyzer": "xingjinzi",
"search_analyzer": "xingjinzi"
},
"tongyici": {
"type": "text",
"analyzer": "tongyici",
"search_analyzer": "tongyici"
}
}
},
"length": {
"type": "integer"
},
"cnlength": {
"type": "integer"
},
"enlength": {
"type": "integer"
},
"otherlength": {
"type": "integer"
}
}
}
}
```
#### 分词器的安装
##### ik分词
```
elasticsearch-plugin install https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v7.13.1/elasticsearch-analysis-ik-7.13.1.zip
文档: https://github.com/medcl/elasticsearch-analysis-ik
```
##### 拼音分词器
```
elasticsearch-plugin install https://github.com/medcl/elasticsearch-analysis-pinyin/releases/download/v7.13.1/elasticsearch-analysis-pinyin-7.13.1.zip
文档 : https://github.com/medcl/elasticsearch-analysis-pinyin
```
##### 繁体字分词器
```
elasticsearch-plugin install https://github.com/medcl/elasticsearch-analysis-stconvert/releases/download/v7.13.1/elasticsearch-analysis-stconvert-7.13.1.zip
```
##### 词库
```
同义词、形近字 在 util文件下
```
#### 查询方法
```
在 start.js里
```
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment