Algorithm azure表的动态搜索
有人知道或有过设计azure table以适应动态搜索的经验吗?Algorithm azure表的动态搜索,algorithm,search,azure,azure-table-storage,Algorithm,Search,Azure,Azure Table Storage,有人知道或有过设计azure table以适应动态搜索的经验吗? 我有一门图书馆课: public class LibraryDocument { public string DocumentNumber { get; set; } public string Complaint { get; set; } public string Respondent { get; set; } public string DocumentDate { get; set; }
我有一门图书馆课:
public class LibraryDocument
{
public string DocumentNumber { get; set; }
public string Complaint { get; set; }
public string Respondent { get; set; }
public string DocumentDate { get; set; }
public string Division { get; set; }
public string DocumentType { get; set; }
public string Content { get; set; }
public string Footer { get; set; }
public string Title { get; set; }
public string[] FooterItems { get; set; }
public string[] RespondentList { get; set; }
public string[] ComplaintList { get; set; }
}
我需要将其转换为azure表
输入:
客户端将通过api发送关键字过程:
系统必须能够匹配所有库数据中的关键字输出:
返回匹配数据的分区键和行键
我想不出更好的方法来设计所需的表格。有什么建议吗?Azure存储表的设计不支持这种使用,主要是因为行的唯一索引是其PartitionKey+RowKey的组合,因此任何不依赖PK(至少)和RK的查询效率都很低(服务器基本上会解析所有行!) 我建议大家看看Lucene.NET,它是一个可以部署在Azure上的搜索引擎。一些资源:
但是,如果必须有ATS提供搜索功能,请考虑创建两个表: LibraryDocuments表将包含所有LibraryDocument对象。PartitionKey/RowKey组合将是唯一的,并为每个文档提供业务含义/关键信息。 创建一个LibraryIndex表,该表将对LibraryDocument的partitionKey/RowKey具体组合中的每个可能的关键字和RowKey进行分区键关闭,在该组合中可以找到该关键字。IE:索引表将提供图书馆文档的索引
这样,您的搜索将始终与PartitionKey协调,从而更快。但是,此搜索可能仍会执行多个请求,因为partitionkey匹配可能跨越多个存储事务,并且需要延续令牌(ETag) 此外,您在执行“包含”类型的搜索时会遇到困难,通常会将此系统带到基本关键字搜索或充其量是“以开头”搜索之后的任何位置HTH我不认为表存储通常是动态搜索的最佳解决方案。我建议您考虑使用LuxEn.NET和Azure目录或其他搜索引擎来实现这个逻辑。
但是,如果必须有ATS提供搜索功能,请考虑创建两个表: LibraryDocuments表将包含所有LibraryDocument对象。PartitionKey/RowKey组合将是唯一的,并为每个文档提供业务含义/关键信息。 创建一个LibraryIndex表,该表将对LibraryDocument的partitionKey/RowKey具体组合中的每个可能的关键字和RowKey进行分区键关闭,在该组合中可以找到该关键字。IE:索引表将提供图书馆文档的索引
这样,您的搜索将始终与PartitionKey协调,从而更快。但是,此搜索可能仍会执行多个请求,因为partitionkey匹配可能跨越多个存储事务,并且需要延续令牌(ETag) 此外,您在执行“包含”类型的搜索时会遇到困难,通常会将此系统带到基本关键字搜索或充其量是“以开头”搜索之后的任何位置 嗯