The MongoDB documentation lists this as an example command to add a text index on fields using weights:
db.blog.ensureIndex(
{
content: "text",
keywords: "text",
about: "text"
},
{
weights: {
content: 10,
keywords: 5,
},
name: "TextIndex"
}
)
If I have another field, say 'weight_value', in each document with a varying number, could I use this field value instead of a discrete number?
Thanks,