小编C.J*_*.J.的帖子

Azure 搜索 .NET SDK 自定义分析器

没有太多背景,这是我的问题:

要使用 C# 中的 .NET SDK 创建新的 Azure 搜索索引(使用文档中提供的 Hotel 示例),我的代码如下所示:

public class Hotel
{
    [System.ComponentModel.DataAnnotations.Key]
    [IsFilterable]
    public string HotelId { get; set; }

    [IsFilterable, IsSortable, IsFacetable]
    public double? BaseRate { get; set; }

    [IsSearchable]
    public string Description { get; set; }

    [IsSearchable]
    [Analyzer(AnalyzerName.AsString.FrLucene)]
    [JsonProperty("description_fr")]
    public string DescriptionFr { get; set; }

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

    [IsSearchable, IsFilterable, IsSortable, IsFacetable]
    public string Category { get; set; }

    [IsSearchable, IsFilterable, IsFacetable]
    public string[] Tags { …
Run Code Online (Sandbox Code Playgroud)

c# wildcard analyzer azure-search-.net-sdk

2
推荐指数
1
解决办法
1163
查看次数

标签 统计

analyzer ×1

azure-search-.net-sdk ×1

c# ×1

wildcard ×1