There's an Exception where I try to create an FTS index on $**. FTS on regular fields (e.g.
{a:"text"}) seems to work as expected.
Below was done with java driver commit 8ca48fafa84fdfa41e6b7e2d8bbca5cf8151fca8 on master.
Mongo mongo = new MongoClient("localhost", 27000); DBCollection coll = mongo.getDB("test").getCollection("a"); DBObject key = new BasicDBObject("$**", "text"); coll.ensureIndex(key);
Exception in thread "main" com.mongodb.MongoException: invalid operator: $** at com.mongodb.MongoException.parse(MongoException.java:82) at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:292) at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:273) at com.mongodb.DBCollection.findOne(DBCollection.java:728) at com.mongodb.DBCollection.findOne(DBCollection.java:670) at com.mongodb.DBApiLayer$MyCollection.createIndex(DBApiLayer.java:342) at com.mongodb.DBCollection.createIndex(DBCollection.java:485) at com.mongodb.DBCollection.ensureIndex(DBCollection.java:561) at com.mongodb.DBCollection.ensureIndex(DBCollection.java:512) at TestEnsureIndex.main(TestEnsureIndex.java:14)