With this dataset, I’m trying to do a query which return for all the document, the rank of the articles relevant. But I don’t know if it is possible with only a mongo query.
content_business : {
id : {….} ,
content : {
uid : « 01234 »,
FL : "bla",
langRef : 1,
articles : [
{
name : « aName »,
rank : 104
},
{
name : « unNom »,
rank : 102
}
]
}
}
A content contains a langRef. This is the index to use to get the right article. Here with the value 1 it means that the articles which is relevant is the one with the index 1 { name : « unNom », rank : 102 }.
For the moment I do a db.find({« FL : bla »}), then with an external program I’m getting the rank of the related (sort of articles[langRef].rank)
But not sure it is the better solution.
Have you got any idea ?
Regards,
Blured.