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

MongoDB\Model\IndexInfo::isText()

1.4版本新增。:

MongoDB\Model\IndexInfo::isText()

返回索引是否为文本索引。

function isText(): boolean

指示索引是否为文本索引的布尔值。

<?php
$collection = (new MongoDB\Client)->selectCollection('test', 'restaurants');
$collection->createIndex(['name' => 'text']);
foreach ($collection->listIndexes() as $index) {
if ($index->isText()) {
printf("%s has default language: %d\n", $index->getName(), $index['default_language']);
}
}

而输出将类似如下所示:

name_text has default language: english