I have several documents in a MongoDB Collection, with a field \'name\' (which is a String).
How can I perform queries like 7 <= name.length <= 14
7 <= name.length <= 14
You can use MongoDB's $where query parameter to submit javascript to the server. E.g.,:
db.myCollection.find( {$where: "(7 <= this.name.length) && (this.name.length <= 14)"} )
http://www.mongodb.org/display/DOCS/Advanced+Queries#AdvancedQueries-JavascriptExpressionsand%7B%7B%24where%7D%7D