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

Allow multiple "text" indices on a collection

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Text Search
    • Query Integration
    • 0

      The manual explains how a compound index that includes a FTS index as one part can significantly optimize queries, since the prefix fields will often narrow down the result set significantly.

      http://docs.mongodb.org/manual/tutorial/limit-number-of-items-scanned-for-text-search/

      However, creating such a compound index is often not possible, because MongoDB allows only a single FTS index per collection.

      For example, to continue the example from the manual, you may want to sometimes search for "red car" across the entire store, without specifying a dept, while other times specifying the dept is possible and could be used to make the query faster. To enable such an optimization it is now necessary, and reasonable, to have both a top-level FTS index as well as a compound dept+FTS index for the same collection.

      It seems the current limitation to have only one FTS index is arbitrary and should be lifted to allow using one or more compound indexes. (For clarity, having more than one top-level FTS index is of course not useful - at least if we ignore multiple languages and other advanced cases.)

            Assignee:
            backlog-query-integration [DO NOT USE] Backlog - Query Integration
            Reporter:
            henrik.ingo@mongodb.com Henrik Ingo (Inactive)
            Votes:
            4 Vote for this issue
            Watchers:
            17 Start watching this issue

              Created:
              Updated: