创建天蓝色搜索索引时无法识别IsSearchable

问题描述

我正在尝试为以下型号创建索引。

public class Booking
    {
        [System.ComponentModel.DataAnnotations.Key]
        [IsSearchable,IsFilterable,IsSortable]
        public string BookId { get; set; }

        [IsSearchable,IsFilterable]
        public string BooknName { get; set; }
    }

创建索引的代码

 FieldBuilder fieldBuilder = new FieldBuilder();
 var searchFields = fieldBuilder.Build(typeof(Booking));
 var definition = new SearchIndex(indexName,searchFields);
 indexClient.CreateOrUpdateIndex(definition);

enter image description here

但是当我查看定义并通过将所有这些都设置为false来创建索引时,这会以某种方式忽略IsSearchable/IsFilterable

我在这里还缺少其他财产吗?我正在使用Azure.Search.Documents - Version=11.1.1.0

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)