は私はそれが与えるクエリMongoDBのテキストインデックスのワイルドカード重量
db.fulltext.find({ $text: { $search: 'hello world' } }, { score: { $meta: 'textScore' } })
しかし...との文書を発見していたサンプルDB構造インデックス
db.fulltext.createIndex({ name: 'text', '$**': 'text' }, { weights: { name: 10, '$**': 5 } })
と
[
{ name: 'hello world', description: { key: 'something' } },
{ name: 'user', description: { key: 'hello world' } },
]
を持っていると仮定します私は両方のドキュメントで15.0のスコアを取得しました...ワイルドカードオペレータにウェイトを追加することは不可能ですか?なぜ2番目の文書にname
のキーを乗算するのか?