-
Type: Bug
-
Resolution: Done
-
Priority: Minor - P4
-
Affects Version/s: 2.6.0-rc0
-
Component/s: Index Maintenance, Text Search
-
Fully Compatible
-
ALL
-
-
Query 11 (03/14/16)
If you create a text index and specify a field weight of 0 or less, you get a confusing error message: 'score for word too high'. This affects version 1 and version 2 text indexes:
> db.newColl.ensureIndex({a: 'text'}, {weights: {foo: 0}}) WriteResult({ "nInserted" : 0, "writeError" : { "code" : 16674, "errmsg" : "score for word too high" } }) > db.newColl.ensureIndex({a: 'text'}, {weights: {foo: 0}, textIndexVersion: 1}) WriteResult({ "nInserted" : 0, "writeError" : { "code" : 17365, "errmsg" : "score for word too high" } })
Version: 1ffdd358b9fa048794a09bbc644f6043dde15eeb