BING searchWeb API OR 运算符
BING searchWeb API OR operator
https://msdn.microsoft.com/en-us/library/ff795643.aspx
OR: Finds webpages that contain either the term that precedes the
operator or the term that follows the operator. Same as | and ||.
那么,查询 a b c OR d e
将 return 结果 a b c e
和 a b d e
,对吗?
如何找到 a b c
和 d e
的结果?
我试过 (a b c) OR (d e)
,但它不起作用。括号用于其他用途:
https://msdn.microsoft.com/en-us/library/ff795621.aspx
In combination with ), operator for term separation and precedence.
Examples As Operator: foo(bar)blue
我可以使用 "a b c" OR "d e"
,但是 "a b c" 应该是精确查询,我不想要这样:
https://msdn.microsoft.com/en-us/library/ff795609.aspx
"phrase”: Returns results that contain the specified phrase, exactly.
如何找到 a b c
和 d e
的结果?
当然,我可以进行 2 个单独的 API 查询,但我们为此支付了两次费用。
组合多个查询通常不是一个好的做法,因为此类查询的相关性变得非常非常困难。由于每个字符串中有多个单词,并且不同单词具有不同的强调(权重),因此很难解析搜索引擎所期望的内容。您可以在多个搜索引擎中看到这种 non-optimal 行为。
如果您可以接受不确定的结果,Bing 上的 +a b c 或 +d e 可能适合您。请注意,这在任何方面都不完美,但最接近您所能得到的。
根据this other page,我们可以使用括号,例如(foo & bar) | (bing & yahoo)
,这样就解决了问题。
https://msdn.microsoft.com/en-us/library/ff795639.aspx
(a b c) | (d e)
https://msdn.microsoft.com/en-us/library/ff795643.aspx
OR: Finds webpages that contain either the term that precedes the operator or the term that follows the operator. Same as | and ||.
那么,查询 a b c OR d e
将 return 结果 a b c e
和 a b d e
,对吗?
如何找到 a b c
和 d e
的结果?
我试过 (a b c) OR (d e)
,但它不起作用。括号用于其他用途:
https://msdn.microsoft.com/en-us/library/ff795621.aspx
In combination with ), operator for term separation and precedence. Examples As Operator: foo(bar)blue
我可以使用 "a b c" OR "d e"
,但是 "a b c" 应该是精确查询,我不想要这样:
https://msdn.microsoft.com/en-us/library/ff795609.aspx
"phrase”: Returns results that contain the specified phrase, exactly.
如何找到 a b c
和 d e
的结果?
当然,我可以进行 2 个单独的 API 查询,但我们为此支付了两次费用。
组合多个查询通常不是一个好的做法,因为此类查询的相关性变得非常非常困难。由于每个字符串中有多个单词,并且不同单词具有不同的强调(权重),因此很难解析搜索引擎所期望的内容。您可以在多个搜索引擎中看到这种 non-optimal 行为。
如果您可以接受不确定的结果,Bing 上的 +a b c 或 +d e 可能适合您。请注意,这在任何方面都不完美,但最接近您所能得到的。
根据this other page,我们可以使用括号,例如(foo & bar) | (bing & yahoo)
,这样就解决了问题。
https://msdn.microsoft.com/en-us/library/ff795639.aspx
(a b c) | (d e)