Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-4820

Clarify that the 'language' field can only be used in the root of a document.

    • Type: Icon: Task Task
    • Resolution: Won't Fix
    • Priority: Icon: Trivial - P5 Trivial - P5
    • Server_Docs_20231030
    • Affects Version/s: mongodb-2.6
    • Component/s: manual, Server
    • Labels:
      None
    • Environment:
      all

      On CS-18520 a customer wanted to created sub documents with a

      {language}

      field.

      We did some test and found that its not possible:

      > db.testCollection.ensureIndex(

      { "$**": "text" }

      ,

      { name: "TextIndex", language_override: "newdoc.language" }

      )
      {
      "errmsg": "exception: language_override is not valid",
      "code": 17136,
      "ok": 0
      }

      The docs don't explicitly say that this is not allowed:

      http://docs.mongodb.org/manual/tutorial/specify-language-for-text-index/#specify-the-default-language-for-a-text-index

      Also, the internal wiki page on text indexes is very helpful. Could we incorporate the examples from the wiki into the public docs:

      https://wiki.mongodb.com/display/KB/FAQ%3A+Creating+a+text+index+and+searching+words+and+phrases

      -Annette

            Assignee:
            kay.kim@mongodb.com Kay Kim (Inactive)
            Reporter:
            annette.morrissey@mongodb.com Annette Morrissey (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:
              1 year, 24 weeks, 4 days ago