Я пытаюсь создать текстовые индексы с весами, но я не мог понять, как это сделать, читая документы API.
Как я могу построить индексы, как показано ниже, в mgo.
db.products.createIndex({
"primaryCategoryIndexes": "text",
"secondaryCategoryIndexes": "text",
"brandIndex": "text",
"primaryTitleIndexes": "text",
"secondaryTitleIndexes": "text",
"indexCycleId": "text"
}, {
"weights": {
"primaryCategoryIndexes":10,
"secondaryCategoryIndexes": 5,
"brandIndex": 5,
"primaryTitleIndexes": 5,
"secondaryTitleIndexes": 5,
"indexCycleId": 5
})