mongoengine.errors.LookUpError: Cannot resolve field "$question_title"

mongoengine.errors.LookUpError: Cannot resolve field "$question_title"

我正在使用 mongodb 的 mongoengine 开发一个 django 项目。我想在我的模型上创建一个文本索引,这就是我所拥有的

models.py

from mongoengine import *

class Questions(Document):
     question_title = StringField(max_length=100)
     question_text = StringField(max_length=500, required=True)
     authors = ReferenceField(Users, required=True,    reverse_delete_rule=CASCADE)
     creation_date = DateTimeField()
     votes = IntField(default=0)

    #.. more fields definitions

   meta = {
        'indexes' : [
        {
            'fields' : ['$question_title', '$question_text'],
            'default_language' : 'english',
            'weight' : {
                '$question_title': 10,
                '$question_text' : 5
            }
        }
    ]
   }

但随后 django 引发了该错误。我应该怎么做才能在我的文档中创建文本索引。非常感谢任何帮助

在索引定义 (examples here) 中存在一些错误:weights 而不是 weight,而不是从权重键中删除 $

    meta = {
        'indexes' : [
        {
            'fields' : ['$question_title', '$question_text'],
            'default_language' : 'english',
            'weights' : {
                'question_title': 10,
                'question_text' : 5
            }
        }
    ]
   }