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

$language in $text queries does not recognize RLP languages

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.2.0-rc4
    • Affects Version/s: 3.1.9
    • Component/s: Querying, Text Search
    • Labels:
      None
    • Fully Compatible
    • ALL
    • 0

      Setup

      db.ara.drop();
      
      // http://en.wikipedia.org/wiki/Arabic_verbs
      db.ara.insert({ _id: "past_writes", t1: "كَتَبْتُ" });
      db.ara.insert({ _id: "present_writes", t1: "أَكْتُبُ" });
      db.ara.insert({ _id: "future_writes", t1: "سَأَكْتُبُ" });
      
      db.ara.ensureIndex({ t1: "text" }, { default_language: "arabic" });
      

      This query works

      db.ara.find( { "$text" : { "$search" : "كتب" } } )
      

      But this query fails when it should work

      db.ara.find( { "$text" : { "$search" : "كتب", $language : "arabic" } } )
      Error: error: {
              "waitedMS" : NumberLong(0),
              "ok" : 0,
              "errmsg" : "$language specifies unsupported language",
              "code" : 2
      }
      

            Assignee:
            mark.benvenuto@mongodb.com Mark Benvenuto
            Reporter:
            mark.benvenuto@mongodb.com Mark Benvenuto
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: