Docs Menu
Docs Home
/ /

string フィールドのインデックス作成方法

MongoDB Search の string タイプを使用して、stringフィールドにインデックスを作成します。MongoDB Search の phrasequerystringspantextwildcardregexmoreLikeThis 演算子をstringタイプとして書き込みフィールドインデックスに使用します。

The string type doesn't support all MongoDB Search features for string fields. Index the string field as a token to:

  • Run a facet query on string fields.

  • Sort the MongoDB Search results by string fields.

  • equalsin、およびrange の各演算子を使って、クエリの完全一致を検索します。

The MongoDB Search dynamic mappings with the default typeSet only indexes string fields as string types. Specify a custom typeSet to dynamically index strings as token or autocomplete to use their supported features.

重要

MongoDB Search は、アナライザトークンのサイズが 32766 バイトを超える、string フィールドのインデックスません。キーワードアナライザを使用している場合、32766 バイトを超える string フィールドはインデックス化されません。

戻る

objectId

項目一覧