Sitecore 9 使用 Azure Search的几个知识点

Sitecore 的patch config文件(通常在app config的Include文件夹中) 使用role:require和search:require,不需要disabled文件后缀名了

写Index的时候,Azure Search要求Field Name必须存在于Schema中( Error Message: Job started: Index_Update_IndexName=bvp_web|#Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.AggregateException: One or more errors occurred. ---> Sitecore.ContentSearch.Azure.Http.Exceptions.BadRequestException: Error in the request URI, headers, or body ---> Sitecore.ContentSearch.Azure.Http.Exceptions.AzureSearchServiceRESTCallException: {"error":{"code":"","message":"The request is invalid. Details: parameters : The property 'c_wbv_09ca13d3cec94069a2678c8573475c1c_tf' does not exist on type 'search.documentFields'. Make sure to only use property names that are defined by the type.\r\n"}})

动态写Field的时候,比如在程序中创建一个新的Field(x_GUID_s),可以override CloudSearchDocumentBuilder,使用SchemaBuilder加入动态Field的定义,然后再写入document就没有问题了

 

Field的Type如果是System.Double是不能定义成 searchable和facetable的(Error Message:  {"error":{"code":"","message":"The request is invalid. Details: definition : The searchable field 'c_www_tf' must be of type Edm.String or Collection(Edm.String).\r\n"}})

 


Field的Type如果是System.String[]是不能定义成 sortable的(Error Message:  {"error":{"code":"","message":"The request is invalid. Details: definition : The field 'c_answer_tag_68dc570c3d5d4044a2a66bad46137418_sm' cannot be enabled for sorting, as it is of a collection type.\r\n"}})

 

转载于:https://www.cnblogs.com/JoeHou/p/10253418.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值