Azure 搜索服务搜索整数
Azure Search Service search integers
假设你有一个简单的索引:
public partial class SomeIndex
{
[Key]
[IsFilterable]
public string Id{ get; set; }
[IsSearchable, IsFilterable, IsSortable]
public string Name{ get; set; }
[IsFilterable, IsSortable]
public int SomeNumber { get; set; }
如何搜索 SomeNumber int 的确切数字匹配?
'eq'
不适用于此处。
任何建议表示赞赏。谢谢你。
您可以使用过滤器。 'eq' 完美运行。
过滤器查询将为 'Field name eq number'
唯一的限制是字段必须是可过滤的
假设你有一个简单的索引:
public partial class SomeIndex
{
[Key]
[IsFilterable]
public string Id{ get; set; }
[IsSearchable, IsFilterable, IsSortable]
public string Name{ get; set; }
[IsFilterable, IsSortable]
public int SomeNumber { get; set; }
如何搜索 SomeNumber int 的确切数字匹配?
'eq'
不适用于此处。
任何建议表示赞赏。谢谢你。
您可以使用过滤器。 'eq' 完美运行。
过滤器查询将为 'Field name eq number'
唯一的限制是字段必须是可过滤的