MongoDB Text Index Error: language override not supported

1,770 views
Skip to first unread message

rbo...@vt.edu

unread,
May 22, 2014, 2:50:55 PM5/22/14
to mongod...@googlegroups.com
I am using version 2.6.1. I am trying to create a text index and I'm getting error:
{
    "connectionId" : 4932,
    "err" : "language override unsupported: en-US",
    "code" : 17262,
    "n" : 0,
    "ok" : 1
}

The documents being searched have a "language" field that has a value of "en-US", but it is not used to override the language in a text search. I tried to create the text index to specify a field that doesn't exist ("lang"); however, I get the same error.
I was able to create the index just fine on version 2.6.0. Is there a way to create the text index and ignore the language_override field?

Here is the working command I used on 2.6.0 (doesn't work on 2.6.1):
db.collection.ensureIndex({ title: "text" }, { name: "TextIndex" })

Here is the command I tried on 2.6.1 to specify another language_override field that does not exist:
db.collection.ensureIndex({ title: "text" }, { name: "TextIndex" }, { language_override: "lang" })

Thanks in advance!

José Antonio Sánchez Ortiz

unread,
May 22, 2014, 4:16:04 PM5/22/14
to mongod...@googlegroups.com
Hi.

en-US is not valid value for language, as you can see in the documentation http://docs.mongodb.org/manual/reference/text-search-languages/#text-search-languages.

José
Reply all
Reply to author
Forward
0 new messages