Note
This page describes text query capabilities for self-managed (non-Atlas) deployments. 本页介绍自我管理(非Atlas)部署的文本查询功能。For data hosted on MongoDB, MongoDB also offers an improved full-text query solution, MongoDB Search and a vector search solution, Vector Search.对于托管在MongoDB上的数据,MongoDB还提供了改进的全文查询解决方案MongoDB搜索和矢量搜索解决方案矢量搜索。
The text index and the $text operator may be used with the following languages, and accepts either the two-letter ISO 639-1 language code or the long form of the language name:text索引和$text运算符可用于以下语言,并接受两个字母的ISO 639-1语言代码或语言名称的长形式:
| ISO 639-1 (Two letter codes) | |
|---|---|
danish | da |
dutch | nl |
english | en |
finnish | fi |
french | fr |
german | de |
hungarian | hu |
italian | it |
norwegian | nb |
portuguese | pt |
romanian | ro |
russian | ru |
spanish | es |
swedish | sv |
turkish | tr |
If you specify a 如果指定default_language value of none, the text index parses through each word in the field, including stop words, and ignores suffix stemming.default_language值none,文本索引将解析字段中的每个单词,包括停用词,并忽略后缀词干。