天蓝色搜索完全匹配

azure search exact match

我有一个 table 有很多数据。一个字段是一个字符串例如

可搜索字段

我只想返回结果第 5 行,但添加搜索 therm defg2 将不起作用。 在其他一些情况下,我只想要返回结果 1、2、3、4、6。但在 defg1 上搜索也不适合我。

对我有用的东西是过滤器,但遗憾的是没有包含的过滤器。我可以做些什么来变通?

请阅读 How full text search works in Azure Search 文章。它将帮助您了解如何处理您的文档和查询字词,以及如何自定义搜索索引的行为以获得您想要的结果。

在您的情况下,您可能希望创建一个 custom analyzer 将文档中的长术语分解为更小的术语,这些术语可能会被应用程序的用户用作查询术语。

或者,您可以使用 Lucene query language to simulate the contains behavior you're looking for. More information here: Azure search, search by partial terms

发出通配符或正则表达式查询

下面的 lucene 查询将有助于像上面的问题一样进行点赞或包含搜索

 item : /.* defg2 .*/

您可以使用search.ismatchsearch.ismatch评分函数

例如: "filter": "search.in(metadata_library, 'a3e9838f-3fec-49d8-a1ea-46f361238ffd') and search.ismatch('[exe pixel!][test new tags 102][css monitor] ', 'metadata_tags','simple','all')",