Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-12801

Allow floating point values for text index weights

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Backlog
    • Minor - P4
    • Resolution: Unresolved
    • 2.5.5
    • None
    • Text Search
    • 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).

      Attachments

        Activity

          People

            backlog-query-integration Backlog - Query Integration
            robert@mongodb.com Robert Stam
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated: