Database Manual / Self-Managed Deployments / Text Search

Text Search Languages on Self-Managed Deployments自我管理部署中的文本搜索语言

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语言代码或语言名称的长形式:

Language Name语言名称ISO 639-1 (Two letter codes)
danishda
dutchnl
englishen
finnishfi
frenchfr
germande
hungarianhu
italianit
norwegiannb
portuguesept
romanianro
russianru
spanishes
swedishsv
turkishtr

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_languagenone,文本索引将解析字段中的每个单词,包括停用词,并忽略后缀词干。