简体   繁体   中英

Determining which field Mongo found a $text $search match on

I'm new to Mongo (2.6.4) and I understand that you can only have one text index per collection.

I can include several fields in the index and weight them, but is there any way to determine which field(s) it found a match on?

与MongoDB 3.0一样, 字段权重可用于在计算相关性得分时设置文档中字段的相对重要性,但是返回结果中没有元数据来指示匹配的字段。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM