使用 shuf 来打乱一个文件中的行或是选择文件中一个随机的行。

es 设计mapping时 如何创建 嵌套型实体:一个实体里面有一个list

Elasticsearch | 作者 PhoebM | 发布于2018年02月11日 | 阅读数:6136

网站项目有模块,模块项目有网页,现在要收集这个网站每个网页的数据,下面的写法对吗?
{
"settings":{
"number_of_shards":5,
"number_of_replicas":0
},
"mappings":{
"ItooWebContentList":{
"dynamic":"strict",
"properties":{
"userId":{"type":"integer","store":"yes"},
"userName":{"type":"string","store":"yes","index":"analyzed","analyzer": "ik_max_word","search_analyzer": "ik_max_word"},
"webmoduleName":{"type":"string","store":"yes","index":"analyzed","analyzer": "ik_max_word","search_analyzer": "ik_max_word"},
"webpageName":{"type":"string","store":"yes","index":"no"},

"bahaviouralAnalysisDataList":{
"userName":{"type":"string","store":"yes","index":"analyzed","analyzer": "ik_max_word","search_analyzer": "ik_max_word"},
"webmoduleName":{"type":"string","store":"yes","index":"analyzed","analyzer": "ik_max_word","search_analyzer": "ik_max_word"},
"webpageName":{"type":"string","store":"yes","index":"no"}
},

"userName":{"type":"string","store":"yes","index":"analyzed","analyzer": "ik_max_word","search_analyzer": "ik_max_word"},
"webmoduleName":{"type":"string","store":"yes","index":"analyzed","analyzer": "ik_max_word","search_analyzer": "ik_max_word"},
"webpageName":{"type":"string","store":"yes","index":"no"}
}
}
}
}

已邀请:

PhoebM - 生活很美好,万一被人误会肯定有自己的原因,受不了就解释,不想解释就看淡些,自己何苦为难自己

赞同来自:

要回复问题请先登录注册