Docs Menu
Docs Home
/
MongoDB マニュアル
/ /

照合ロケールとデフォルト パラメーター

項目一覧

  • 動作
  • サポートされている言語とロケール
  • 照合のデフォルト パラメーター

バージョン 3.4 で追加

照合を指定すると、大文字・小文字やアクセント記号など、文字列を比較するための言語独自のルールを指定できます。

一部の照合ロケールには、言語固有の特別なルールを使用するバリアントがあります。ロケール バリアントを指定するには、次の構文を使用します。

{ "locale" : "<locale code>@collation=<variant>" }

たとえば、中国語照合の unihan バリアントを使用するには、次のようにします。

{ "locale" : "zh@collation=unihan" }

照合の動作と構文について詳しくは、照合ページを参照してください。

MongoDB の照合機能では、以下の言語がサポートされています。 次の表は、サポート対象の言語と、 ICU ロケール ID で定義された関連ロケールを示しています。 。[ 1 ]

言語
ロケール
バリアント
Afrikaans
af
アルバニア語
sq
アムハラ語
am
アラビア語
ar
compat
アルメニア語
hy
アッサム語
as
Azeri
az
search
ベンガル語
bn
ベラルーシ語
be
ベンガル語
bn
traditional
ボスニア語
bs
search
ボスニア語(キリル文字)
bs_Cyrl
ブルガリア語
bg
ビルマ語
my
Catalan
ca
search
チェロキー語
chr
中国語
zh
big5han
gb2312han
unihan
zhuyin
中国語(繁体字)
zh_Hant
クロアチア語
hr
search
チェコ語
cs
search
デンマーク語
da
search
オランダ語
nl
ゾンカ語
dz
英語
en
英語(米国)
en_US
英語(米国、コンピューター)
en_US_POSIX
Esperanto
eo
エストニア語
et
Ewe
ee
Faroese
fo
Filipino
fil
フィンランド語
fi
search
traditional
フランス語
fr
フランス語(カナダ)
fr_CA
ガリシア語
gl
search
ジョージア語
ka
ドイツ語
de
search
eor
phonebook
ドイツ語(オーストリア)
de_AT
phonebook
ギリシャ語
el
グジャラート語
gu
Hausa
ha
ハワイ語
haw
ヘブライ語
he
search
Hindi
hi
ハンガリー語
hu
アイスランド語
is
search
Igbo
ig
イナリ・サーミ語
smn
search
インドネシア語
id
アイルランド語
ga
イタリア語
it
日本語
ja
unihan
言語
ロケール
バリアント
Kalaallisut
kl
search
Kannada
kn
traditional
カザフ語
kk
クメール語
km
Konkani
kok
韓国語
ko
search
searchjl
unihan
Kyrgyz
ky
Lakota
lkt
Lao
lo
ラトビア語
lv
Lingala
ln
phonetic
リトアニア語
lt
低地ソルブ語
dsb
ルクセンブルク語
lb
マケドニア語
mk
マレー語
ms
マラヤーラム語
ml
Maltese
mt
マラーティー語
mr
モンゴル語
mn
Nepali
ne
北サーミ語
se
search
ノルウェー語(ブークモール)
nb
search
ノルウェー語
nn
search
オリヤー語
or
Oromo
om
パシュトゥー語
ps
ペルシャ語
fa
ペルシャ語(アフガニスタン)
fa_AF
ポーランド語
pl
ポルトガル語
pt
Punjabi
pa
ルーマニア語
ro
ロシア語
ru
セルビア語
sr
セルビア語(ラテン語)
sr_Latn
search
Sinhala
si
dictionary
スロバキア語
sk
search
スロベニア語
sl
スペイン語
es
search
traditional
スワヒリ語
sw
スウェーデン語
sv
search
タミル語
ta
テルグ語
te
タイ語
th
Tibetan
bo
Tongan
to
トルコ語
tr
search
ウクライナ語
uk
上ソルブ語
hsb
Urdu
ur
Uyghur
ug
ベトナム語
vi
traditional
Walser
wae
ウェールズ語
cy
イディッシュ語
yi
search
Yoruba
yo
ズールー語
zu

Tip

単純なバイナリ比較を明示的に指定するには、"simple"locale 値を指定します。

[1] ロケールのサポートをリクエストするには、 サーバー プロジェクト で JIRA チケットを提出してください

照合ドキュメントには、必須の locale パラメーターに加えて、いくつかのオプションのパラメーターが含まれています。使用する locale に応じて、デフォルトのパラメーターが異なる場合があります。照合構文の詳細な説明については、照合ページを参照してください。

次のデフォルト パラメーターはすべてのロケールで一貫しています。

  • caseLevel : false

  • strength : 3

  • numericOrdering : false

  • maxVariable : punct

次の表は、ロケールによって異なる可能性があるデフォルトの照合パラメーターを示しています。

ロケール
caseFirst
代替
正規化
バックワード
af
off
non-ignorable
FALSE
FALSE
sq
off
non-ignorable
FALSE
FALSE
am
off
non-ignorable
FALSE
FALSE
ar
off
non-ignorable
FALSE
FALSE
ar@collation=compat
off
non-ignorable
FALSE
FALSE
hy
off
non-ignorable
FALSE
FALSE
as
off
non-ignorable
TRUE
FALSE
az
off
non-ignorable
FALSE
FALSE
az@collation=search
off
non-ignorable
TRUE
FALSE
be
off
non-ignorable
FALSE
FALSE
bn
off
non-ignorable
TRUE
FALSE
bn@collation=traditional
off
non-ignorable
TRUE
FALSE
bs
off
non-ignorable
FALSE
FALSE
bs@collation=search
off
non-ignorable
TRUE
FALSE
bs_Cyrl
off
non-ignorable
FALSE
FALSE
bg
off
non-ignorable
FALSE
FALSE
my
off
non-ignorable
TRUE
FALSE
ca
off
non-ignorable
FALSE
FALSE
ca@collation=search
off
non-ignorable
TRUE
FALSE
chr
off
non-ignorable
FALSE
FALSE
zh
off
non-ignorable
FALSE
FALSE
zh@collation=big5han
off
non-ignorable
FALSE
FALSE
zh@collation=gb2312han
off
non-ignorable
FALSE
FALSE
zh@collation=unihan
off
non-ignorable
FALSE
FALSE
zh@collation=zhuyin
off
non-ignorable
FALSE
FALSE
zh_Hant
off
non-ignorable
FALSE
FALSE
hr
off
non-ignorable
FALSE
FALSE
hr@collation=search
off
non-ignorable
TRUE
FALSE
cs
off
non-ignorable
FALSE
FALSE
cs@collation=search
off
non-ignorable
TRUE
FALSE
da
upper
non-ignorable
FALSE
FALSE
da@collation=search
off
non-ignorable
TRUE
FALSE
nl
off
non-ignorable
FALSE
FALSE
dz
off
non-ignorable
FALSE
FALSE
en
off
non-ignorable
FALSE
FALSE
en_US_POSIX
off
non-ignorable
FALSE
FALSE
en_US
off
non-ignorable
FALSE
FALSE
eo
off
non-ignorable
FALSE
FALSE
et
off
non-ignorable
FALSE
FALSE
ee
off
non-ignorable
FALSE
FALSE
fo
off
non-ignorable
FALSE
FALSE
fo@collation=search
off
non-ignorable
TRUE
FALSE
fil
off
non-ignorable
FALSE
FALSE
fi
off
non-ignorable
FALSE
FALSE
fi@collation=search
off
non-ignorable
TRUE
FALSE
fi@collation=traditional
off
non-ignorable
FALSE
FALSE
fr
off
non-ignorable
FALSE
FALSE
fr_CA
off
non-ignorable
FALSE
TRUE
gl
off
non-ignorable
FALSE
FALSE
gl@collation=search
off
non-ignorable
TRUE
FALSE
ka
off
non-ignorable
FALSE
FALSE
de
off
non-ignorable
FALSE
FALSE
de@collation=search
off
non-ignorable
TRUE
FALSE
de@collation=phonebook
off
non-ignorable
FALSE
FALSE
de@collation=eor
off
non-ignorable
FALSE
FALSE
de_AT
off
non-ignorable
FALSE
FALSE
de_AT@collation=phonebook
off
non-ignorable
FALSE
FALSE
el
off
non-ignorable
TRUE
FALSE
gu
off
non-ignorable
TRUE
FALSE
ha
off
non-ignorable
FALSE
FALSE
haw
off
non-ignorable
FALSE
FALSE
he
off
non-ignorable
TRUE
FALSE
he@collation=search
off
non-ignorable
TRUE
FALSE
hi
off
non-ignorable
TRUE
FALSE
hu
off
non-ignorable
FALSE
FALSE
is
off
non-ignorable
FALSE
FALSE
is@collation=search
off
non-ignorable
TRUE
FALSE
ig
off
non-ignorable
TRUE
FALSE
smn
off
non-ignorable
FALSE
FALSE
smn@collation=search
off
non-ignorable
TRUE
FALSE
id
off
non-ignorable
FALSE
FALSE
ga
off
non-ignorable
FALSE
FALSE
it
off
non-ignorable
FALSE
FALSE
ja
off
non-ignorable
FALSE
FALSE
ja@collation=unihan
off
non-ignorable
FALSE
FALSE
kl
off
non-ignorable
FALSE
FALSE
kl@collation=search
off
non-ignorable
TRUE
FALSE
kn
off
non-ignorable
TRUE
FALSE
kn@collation=traditional
off
non-ignorable
TRUE
FALSE
kk
off
non-ignorable
FALSE
FALSE
km
off
non-ignorable
TRUE
FALSE
kok
off
non-ignorable
TRUE
FALSE
ko
off
non-ignorable
FALSE
FALSE
ko@collation=search
off
non-ignorable
TRUE
FALSE
ko@collation=searchjl
off
non-ignorable
TRUE
FALSE
ko@collation=unihan
off
non-ignorable
FALSE
FALSE
ky
off
non-ignorable
FALSE
FALSE
lkt
off
non-ignorable
FALSE
FALSE
lo
off
non-ignorable
FALSE
FALSE
lv
off
non-ignorable
FALSE
FALSE
ln
off
non-ignorable
FALSE
FALSE
ln@collation=phonetic
off
non-ignorable
FALSE
FALSE
lt
off
non-ignorable
FALSE
FALSE
dsb
off
non-ignorable
FALSE
FALSE
lb
off
non-ignorable
FALSE
FALSE
mk
off
non-ignorable
FALSE
FALSE
ms
off
non-ignorable
FALSE
FALSE
ml
off
non-ignorable
FALSE
FALSE
mt
upper
non-ignorable
FALSE
FALSE
mr
off
non-ignorable
TRUE
FALSE
mn
off
non-ignorable
FALSE
FALSE
ne
off
non-ignorable
FALSE
FALSE
se
off
non-ignorable
FALSE
FALSE
se@collation=search
off
non-ignorable
TRUE
FALSE
nb
off
non-ignorable
FALSE
FALSE
nb@collation=search
off
non-ignorable
TRUE
FALSE
nn
off
non-ignorable
FALSE
FALSE
nn@collation=search
off
non-ignorable
TRUE
FALSE
or
off
non-ignorable
TRUE
FALSE
om
off
non-ignorable
FALSE
FALSE
ps
off
non-ignorable
TRUE
FALSE
fa
off
non-ignorable
TRUE
FALSE
fa_AF
off
non-ignorable
TRUE
FALSE
pl
off
non-ignorable
FALSE
FALSE
pt
off
non-ignorable
FALSE
FALSE
pa
off
non-ignorable
TRUE
FALSE
ro
off
non-ignorable
FALSE
FALSE
ru
off
non-ignorable
FALSE
FALSE
sr
off
non-ignorable
FALSE
FALSE
sr_Latn
off
non-ignorable
FALSE
FALSE
sr_Latn@collation=search
off
non-ignorable
TRUE
FALSE
si
off
non-ignorable
TRUE
FALSE
si@collation=dictionary
off
non-ignorable
TRUE
FALSE
sk
off
non-ignorable
FALSE
FALSE
sk@collation=search
off
non-ignorable
TRUE
FALSE
sl
off
non-ignorable
FALSE
FALSE
es
off
non-ignorable
FALSE
FALSE
es@collation=search
off
non-ignorable
TRUE
FALSE
es@collation=traditional
off
non-ignorable
FALSE
FALSE
sw
off
non-ignorable
FALSE
FALSE
sv
off
non-ignorable
FALSE
FALSE
sv@collation=search
off
non-ignorable
TRUE
FALSE
ta
off
non-ignorable
TRUE
FALSE
te
off
non-ignorable
TRUE
FALSE
th
off
シフト済み
TRUE
FALSE
bo
off
non-ignorable
FALSE
FALSE
to
off
non-ignorable
FALSE
FALSE
tr
off
non-ignorable
FALSE
FALSE
tr@collation=search
off
non-ignorable
TRUE
FALSE
uk
off
non-ignorable
FALSE
FALSE
hsb
off
non-ignorable
FALSE
FALSE
ur
off
non-ignorable
FALSE
FALSE
ug
off
non-ignorable
FALSE
FALSE
vi
off
non-ignorable
TRUE
FALSE
vi@collation=traditional
off
non-ignorable
TRUE
FALSE
wae
off
non-ignorable
FALSE
FALSE
cy
off
non-ignorable
FALSE
FALSE
yi
off
non-ignorable
TRUE
FALSE
yi@collation=search
off
non-ignorable
TRUE
FALSE
yo
off
non-ignorable
TRUE
FALSE
zu
off
non-ignorable
FALSE
FALSE

戻る

照合