【发布时间】:2016-05-14 14:25:03
【问题描述】:
我正在尝试将数据从沙发基础存储桶复制到弹性搜索索引“测试”。我已经为我的“测试索引”完成了以下设置。
"settings": {
"analysis": {
"analyzer": {
"my_analyzer":{
"type":"custom",
"tokenizer" : "standard",
"filter" : ["standard", "lowercase","asciifolding","my_stemmer","autocomplete","my_stop","my_synonym_filter"]
}
},
"filter": {
"my_stemmer":{
"type":"stemmer",
"name":"english"
},
"autocomplete":{
"type":"edge_ngram",
"min_gram":1,
"max_gram":20
},
"my_stop":{
"type":"stop",
"stopwords":"_english_"
},
"my_synonym_filter":{
"type":"synonym",
"synonyms": [
"united states,u s a,united states of america=>usa"
]
}
}
}
我有类型的映射-“配置文件”在下面。
"profile":{
"properties": {
"name":{
"type": "string",
"index_analyzer": "my_analyzer",
"search_analyzer": "english"
},
"title":{
"type": "string",
"index_analyzer": "my_analyzer",
"search_analyzer": "english"
},
"description":{
"type": "string",
"search_analyzer": "english",
"index_analyzer": "my_analyzer"
},
我的沙发基础文档如下。
{
"name": "xxxx",
"title": "junior android developer",
"description": "I am developing new android applications",}
我的问题是,
当我将此文档复制到 elasticsearch 时,我如何才能将此设置和映射用于此沙发基础文档?
默认情况下,couch base 传输插件将此文档映射到“couchbaseDocument”类型,elasticsearch 会自动映射此文档。如何更改此行为?
请帮助我。非常感谢您。
【问题讨论】:
-
couchbase 文档 ID - 'profile:1'
标签: elasticsearch couchbase elasticsearch-plugin