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

Allow multiple "text" indices on a collection

    XMLWordPrintable

Details

    • Improvement
    • Status: Backlog
    • Major - P3
    • Resolution: Unresolved
    • None
    • None
    • Text Search
    • None
    • 0

    Description

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

      Attachments

        Issue Links

          Activity

            People

              backlog-query-optimization Backlog - Query Optimization
              henrik.ingo@mongodb.com Henrik Ingo (Inactive)
              Votes:
              4 Vote for this issue
              Watchers:
              15 Start watching this issue

              Dates

                Created:
                Updated: