【发布时间】:2020-09-07 23:54:51
【问题描述】:
我想知道如何通过 XML 在我的 ODM 配置中添加文本类型索引来解决这个问题并按名称搜索。
感谢一切。
问候。
PD:对不起我的英语。
<document name="App\Document\Doc" db="db" collection="collection"
repository-class="App\Repository\DocRepository">
<id field-name="id" strategy="INCREMENT" type="int"/>
<field field-name="code" name="code" type="string"/>
<field field-name="name" name="name" type="string"/>
<field field-name="type" name="type" type="string"/>
<indexes>
???
</indexes>
</document>
【问题讨论】:
标签: mongodb indexing text document odm