【发布时间】:2018-07-24 01:30:57
【问题描述】:
我有一个数据库,其中包含大约 5 万条关于候选人的记录,如下例所示:
[
{
"_id":{
"$oid":"5744eff20ca7832b5c7452321"
},
"name":"Candidate 1",
"characteristics":[
{
"name":"personal skills",
"info":[
"Great speaker",
"Very friendly",
"Born to be a leader"
]
},
{
"name":"education background",
"info":[
"Studied Mechanical Engineering",
"Best of his class 2001"
]
}
]
},
... thousands more objects with same structure
]
考虑到一些个人技能,我想为该输入搜索最佳匹配:
输入示例: [“演讲者”,“领导者”]
预期输出: 从最佳匹配下降的候选(整个对象)列表。
我基本上只需要搜索“个人技能”这个字段。
使用 MongoDB 解决这个问题有什么好的方法?或者是否有其他数据库更适合这个问题?
【问题讨论】:
标签: mongodb mongodb-query full-text-search bigdata aggregation-framework