我想從沙發基礎桶複製數據到elasticsearch索引「測試」。我已經完成了我的「測試索引」的以下設置。Couchbase文檔映射到elasticsearch
"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,我怎麼可以使用此設置和映射這個沙發基礎文件?
沙發底座傳輸插件默認情況下將此文檔映射到「couchbaseDocument」類型,elasticsearch自動映射此文檔。如何更改此行爲?
請幫幫我。非常感謝你提前。
couchbase文檔ID - 'profile:1' –