title: "$**" wildcard specifier for text index - MongoDB in JAVA
body: <p>I want to create a text index on a collection having documents with String fields. However, this command:</p>
  
  <pre><code>coll_events.ensureIndex(new BasicDBObject("$**", "text"));
  </code></pre>
  
  <p>However, this is returning the following error:
  Can't canonicalize query: BadValue unknown operator: $**</p>
  
  <p>I have enabled the textSearchEnabled=true in the setParameter option also.</p>
  
  <p><strong>Edit 1:</strong> 
  I have tried the same command (it's equivalent) in the Mongo Shell given for windows as:</p>
  
  <pre><code>coll_event.ensureIndex({"$**": "text"})
  </code></pre>
  
  <p><strong>This command works fine</strong>. So I think the problem should be somewhere in the mongodb java driver.</p>