Bing:搜索 - 仅匹配精确的文字字符串?
我正在使用 PHP 和 Bing API 来搜索某些域名。 我只想要完全匹配的结果。
无论如何,Bing 返回的结果并不完全匹配。
当我搜索:
“www.gebouw.nl”
时,我有时也会得到类似“www.gprgebouw.nl”的结果
有没有办法告诉 Bing 仅搜索完全匹配?
I'm using PHP and the Bing API to search for certain domainnames.
I want only the results that are an EXACT match.
Somehow Bing returns results that do not match exactly.
When I search for :
"www.gebouw.nl"
I sometimes also get results like "www.gprgebouw.nl"
Is there a way to tell Bing to search only for EXACT matches?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
尝试在您的查询中添加加号。例如+www.gebouw.nl,当url编码
http://www.google.com/support/websearch/bin/answer.py?answer=136861
http://onlinehelp.microsoft.com/en-us/bing/ff808438.aspx
Try adding a plus sign to your query. e.g. +www.gebouw.nl which is %2Bwww.gebouw.nl when url encoded
http://www.google.com/support/websearch/bin/answer.py?answer=136861
http://onlinehelp.microsoft.com/en-us/bing/ff808438.aspx
WebSearchOptions='DisableQueryAlterations' 可能是这个问题的关键吗?
根据 API 文档,“DisableQueryAlterations 阻止 Bing 更改查询字符串。此类更改可能是为了纠正原始查询字符串中明显的拼写错误。”
Could WebSearchOptions='DisableQueryAlterations' be the key to this?
As per API documentation, "DisableQueryAlterations Prevents Bing from altering the query string. Such alteration may have been done to correct apparent spelling error in the original query string."
制定查询:
要搜索特定域的结果,请使用
site:
运算符,后跟域名。例如,如果您只想在域“example.com”上搜索“cats”,您的查询将如下所示:cats site:example.com
示例 Python 代码如下
Formulate your query:
To search for results from a specific domain, use the
site:
operator followed by the domain name. For example, if you want to search for "cats" only on the domain "example.com", your query would look like this:cats site:example.com
Sample Python code is below