[SERVER-12801] Allow floating point values for text index weights Created: 20/Feb/14  Updated: 28/Dec/23

Status: Backlog
Project: Core Server
Component/s: Text Search
Affects Version/s: 2.5.5
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: Robert Stam Assignee: Backlog - Query Integration
Resolution: Unresolved Votes: 0
Labels: qi-text-search
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Assigned Teams:
Query Integration
Participants:

 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).


Generated at Thu Feb 08 03:29:39 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.