我无法为"hashtags"创建自定义映射,"hashtags"是elasticsearch中"twitter_entities"的子字段.我尝试通过以下方式实现:
{
"mappings": {
"tweet" : {
"properties": {
"twitter_entities.hashtags" : {
"type" : "multi_field",
"fields" : {
"hashtag" : {
"type" : "string",
"analyzer" : "hashtag"
},
"autocomplete" : {
"type" : "string",
"index_analyzer" : "hashtag_autocomplete",
"search_analyzer" : "hashtag"
}
}
}
}
}
}
}
Run Code Online (Sandbox Code Playgroud)
这会创建另一个名为"twitter_entities.hashtags"的根域
{
"mappings": {
"tweet" : {
"properties": {
"hashtags" : {
"type" : "multi_field",
"fields" : {
"hashtag" : {
"type" : "string",
"analyzer" : "hashtag"
},
"autocomplete" : {
"type" : …Run Code Online (Sandbox Code Playgroud)