MongoEngine/mongoengine — pull request #680 by claymation (2014-06-27 15:09:26+00:00)
Title: Include preliminary support for text indexes

As the first pass at adding text index support to MongoEngine, here's a patch that lets you specify text indexes in the `Document.meta.indexes` field. To index a text field, prefix the field name with `$`, as in `$title`:

class Book(Document):
title = StringField()
meta = {
"indexes": ["$title"],
}

If this looks like the right approach, let me know and I'll resubmit with a test case.

NB: Requires MongoDB 2.6.x.