对于 AI 代理:可在 https://www.mongodb.com/zh-cn/docs/llms.txt 获取文档索引—通过在任何 URL 路径后添加 .md 可获取所有页面的 Markdown 版本。
Docs 菜单

如何对字符串字段进行索引

Use the MongoDB Search string type to index string fields. Use the MongoDB Search phrase, querystring, span, text, wildcard, regex, and moreLikeThis operators to query fields indexed as the string type.

string 类型不支持字符串字段的所有MongoDB搜索功能。将字符串字段作为词元进行索引:

  • 对字符串字段运行分面查询。

  • 按字符串字段对MongoDB搜索结果进行排序。

  • 使用 equals、in 和 range 操作符查找查询的精确匹配项。

MongoDB Search 动态映射 使用默认typeSet 仅将字符串字段索引为 string 类型。指定自定义 typeSet 以将字符串动态索引为 token 或 autocomplete 以使用其支持的功能。

重要

MongoDB Search 不会对分析器词元大小超过 32766 字节的字符串字段索引。 如果使用关键字分析器,则不会对超过 32766 字节的字符串字段编制索引。

给本页内容打分