KQL 中“where * contains”和“search”是同一个运算符吗?

问题描述 投票:0回答:1

KQL 中

where * contains 
search
是同一个运算符吗?

例如以下查询相同吗?

union *
| where * contains "foo"

union *
| search "foo"

我尝试查找有关

search
关键字的任何内容,但一无所获,因为所有结果都被与该关键字无关的内容污染了。人们似乎通常将“
search
”这个词与任何与 KQL 相关的内容一起使用。

虽然我知道

where * contains "foo"
将获得所有在任何列的值中都存在大小写敏感
"foo"
的结果。

我需要知道这个问题的答案,因为

search
where * contains
短,我想用
search
代替。但我不确定我是否会得到任何不同的行为。

azure search contains kql case-insensitive
1个回答
0
投票

我在我的环境中进行了复制,以下是我的观察结果:

是的,

where * contains "x"
serach "x"
类似,因为它具有相似的功能,但输出略有不同:

使用

 where * contains

enter image description here

使用

Search

enter image description here

在这里,您可以清楚地看到表中又添加了 1 个名为 $table 的列,我想说两者都有

similar functionality
但给出了不同的结果。

搜索的一个用途是您不需要使用管道 |运算符,如果您在如下表中搜索:

search in (Table name) "Error"

enter image description here

欲了解更多信息,您可以参考搜索

Where 用于在单个表中查找,where as Search 将在特定集群的所有表中查找

© www.soinside.com 2019 - 2024. All rights reserved.