-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Minor - P4
-
None
-
Affects Version/s: 2.5.5
-
Component/s: Text Search
-
Query Integration
-
None
-
0
-
None
-
None
-
None
-
None
-
None
-
None
Currently the values for the optional weights for a text index must be integers. It would be nice if they could be floating point values to express weights as fractions. For example:
> db.test.ensureIndex( ... { field1 : "text", field2 : "text", unimportant : "text", moreimportant : "text" }, ... { weights : { unimportant : 0.6, moreimportant : 1.75 } } ... )
Which would be intended to mean that the unimportant field is 60% as important and that the moreimportant field is 75% more important than the default weight for the rest of the fields (where the default is 1.0).