如何使用属性来表示 Nest 中的关键字数组

How to use attributes to denote an array of keywords in Nest

我有 属性 类型 string[]。我希望其成员不被分析,即 Keyword

类型

如何使用属性将我的意图告知 Nest?

你只需要使用 [Keyword] attribute; Elasticsearch 不区分具有单个值的字段或具有多个值的数组