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.

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Trivial - P5
    • Resolution: Unresolved
    • Affects Version/s: mongodb-2.6
    • Fix Version/s: None
    • Component/s: manual, Server
    • Labels:
      None
    • Environment:
      all

      Description

      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

        Attachments

          Activity

            People

            Assignee:
            kay.kim Kay Kim (Inactive)
            Reporter:
            annette.morrissey Annette Morrissey (Inactive)
            Participants:
            Last commenter:
            Kay Kim Kay Kim (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Days since reply:
              5 years, 10 weeks ago
              Date of 1st Reply: