Details
-
Improvement
-
Status: Backlog
-
Minor - P4
-
Resolution: Unresolved
-
2.5.5
-
None
-
None
-
Query Integration
Description
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).