我想在Lucene中实现“共同好友”的功能,所以我有很多文档都有好友列表。
DOC:
id: p1
name: Mike
profile_id: 1
friends_id: [2,3,4,5,6,7,8]
或者
id: p3
name: John
profile_id: 3
friends_id: [6,7,8,9,10]
或者
id: p5
name: Roftl
profile_id: 5
friends_id: [1,2,3,6,10]
如果我是帐户 Mike,我想通过 Lucene 查询找到另一个具有更多共同朋友的帐户。如果可能的话,还可以在响应中添加带有该数字的字段。