[SERVER-9932] Text search languages should accept standard two letters notation "en", "es"... (ISO 639-1) Created: 13/Jun/13  Updated: 12/Aug/14  Resolved: 13/Nov/13

Status: Closed
Project: Core Server
Component/s: Text Search
Affects Version/s: None
Fix Version/s: 2.5.4

Type: Improvement Priority: Major - P3
Reporter: Laurent Payot Assignee: J Rassi
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by DOCS-1931 Document: Text search languages shoul... Closed
Gantt Dependency
has to be done before SERVER-10906 Support for legacy text index format ... Closed
Related
is related to DOCS-3880 Norwegian language code is "nb" rathe... Closed
Participants:

 Description   

Language specifiers (used in the $text query operator, the to-be-deprecated "text" command, the text index "default_language" option, and in document language annotations) will be able to use the following aliases (in addition to their respective English-language equivalents): da, de, en, es, fi, fr, hu, it, nl, no, pt, ro, ru, sv, tr. These aliases will be treated as case-insensitive.

Original description:

Instead of strings like "english" or "spanish" or "french" text search languages notation should be standard two letters (ISO 639-1) like everywhere else (web pages, domain names, keyboards, manuals...).
That's the way it is coded in any decent application. It's THE standard for languages names. The full list here: https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes

At the very least MongoDB should accept BOTH notations. It's such a quick fix.



 Comments   
Comment by Githook User [ 13/Nov/13 ]

Author:

{u'username': u'jrassi', u'name': u'Jason Rassi', u'email': u'rassi@10gen.com'}

Message: SERVER-9932 SERVER-10857 Text search language aliases/validation

Users can now use two-letter language codes and can specify
languages in mixed case.

The following operations will now fail if they do not pass language
validation:

  • Building a text index (if default_language fails validation or if
    the target collection contains a document with a language that
    fails validation).
  • Inserting a document into a text-indexed collection (if it
    specifies a language that fails validation).
  • A text query or text command (if it specifies a language that
    fails validation).
    Branch: master
    https://github.com/mongodb/mongo/commit/075ff3c615cc9c53aab272af32a180d9f1ceda4a
Comment by auto [ 13/Nov/13 ]

Author:

{u'username': u'jrassi', u'name': u'Jason Rassi', u'email': u'rassi@10gen.com'}

Message: SERVER-9932 SERVER-10857 Text search language aliases/validation

Users can now use two-letter language codes and can specify
languages in mixed case.

The following operations will now fail if they do not pass language
validation:

  • Building a text index (if default_language fails validation or if
    the target collection contains a document with a language that
    fails validation).
  • Inserting a document into a text-indexed collection (if it
    specifies a language that fails validation).
  • A text query or text command (if it specifies a language that
    fails validation).
    Branch: master
    https://github.com/mongodb/mongo/commit/075ff3c615cc9c53aab272af32a180d9f1ceda4a
Comment by Laurent Payot [ 13/Jun/13 ]

PS: the current list of languages names we have to use is here: http://docs.mongodb.org/manual/reference/command/text/#text-search-languages

Generated at Thu Feb 08 03:21:50 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.