0

Why would this call to to the Bing API's News Search endpoint...

https://api.cognitive.microsoft.com/bing/v7.0/news/search?q="Highwire+Press"+OR+"Chrome+River"+OR+"PCA+Predict"+OR+"Backbase"+OR+"Arrivalist"+OR+"iotec"+OR+"Signafire"+OR+"Mirriad"&sortBy=Date&textDecorations=true&textFormat=HTML

... turn up this story https://www.bizjournals.com/philadelphia/prnewswire/press_releases/Pennsylvania/2018/05/24/MN04495

... which contains "HighWire" but not the phrase "HighWire Press" as given in the query?

I'm finding other examples of looseness in multi-word sub-queries in the query string...

Why does it also seem to produce https://www.independent.ie/business/technology/feeding-the-future-test-tube-trees-robots-picking-fruit-and-burgers-made-without-cows-36942007.html as a result? That doesn't seem to contain anything matching.

Robert Andrews
  • 1,209
  • 4
  • 23
  • 47

1 Answers1

-1

For strict/verbatim matching, you can use "+" operator. For example, if you are only interested in Highwire Press, your query should read +Highwire Press. No need to have quotes.

Also, "OR" operator behavior is dubious if you want to use with strict/verbatim matches across all search engines. It makes it difficult for relevance rankers to weigh words it seems. May be you can make 2 queries one each for ORed terms.

Ronak
  • 751
  • 5
  • 10
  • 1. So how would I do +Highwire Press but in a query URL - do I need to escape/encode the space? Where is this documented? I thought quotes were for verbatim. 2. But I _do_ need to conduct OR searches (not _this_ many, but I'm testing and need results). Two queries not viable, OR should be valid. Web search for same https://www.bing.com/news/search?q=%22Highwire+Press%22+OR+%22Chrome+River%22+OR+%22PCA+Predict%22+OR+%22Backbase%22+OR+%22Arrivalist%22+OR+%22iotec%22+OR+%22Signafire%22+OR+%22Mirriad%22&qft=sortbydate%3d%221%22&form=YFNR seems to have fewer-to-none of these loose results. – Robert Andrews May 30 '18 at 18:32
  • 1. **q=%2BHighwire%20Press** should work for verbatim - single phrase. 2. You can use the "phrase 1" OR "phrase 2" for ORing multiple queries. – Ronak May 30 '18 at 23:58
  • Ronak, I don't think that's right. In testing, q=%2BHighwire%20Press (aka +Highwire Press) returns a story matching "Highwire" and "Press" somewhere in the body separately, as well as "Highwire Press" together. The former is wrong, it should only match the latter. – Robert Andrews May 31 '18 at 07:07
  • I'm really struggling with the accuracy of this API. I've switched the encoding/escaping to use character codes rather than double-quotes and plus signs in the URL (maybe that is a factor? Nice to know). But I'm still seeing weird matches. Query https://api.cognitive.microsoft.com/bing/v7.0/news/search?q=%22Eleven%20James%22%20OR%20%22Highwire%20Press%22%20OR%20%22PCA%20Predict%22%20OR%20%22Clarity%20PR%22&sortBy=Date&textDecorations=true&textFormat=HTML returns https://onekindesign.com/2016/02/21/courtyard-house-gets-modernized-update-melbourne/ which doesn't seem to have ANY matching text. – Robert Andrews May 31 '18 at 07:35
  • Robert, I see all the results with both highwire and press: https://www.bing.com/search?q=%2Bhighwire%20press&qs=n&form=QBRE&sp=-1&pq=%2Bhighwire%20press&sc=8-15&sk=&cvid=F4D077A8E508405AB58EB38E75E9E2C6. So, "+" operator should work for verbatim matches. "OR"ing is typically not a great practice for any search engine as it makes it difficult to understand intent. If you could express here, why "OR"ing is must for you, may be somebody can guide on alternates. – Ronak May 31 '18 at 17:32
  • Ronak, but if you flip to *News* for the same Web search URL you provided, you will see that, unlike Web ("All"), it is showing incorrect results - not strictly matching "Highwire Press", but just matching "Highwire", so plus is not verbatim there. Within News, https://www.bing.com/news/search?q=%2bhighwire+press&FORM=HDRSC6 (your suggestion, singular, +Highwire Press) seems wrong and quite different from https://www.bing.com/news/search?q=%2bhighwire+press&FORM=HDRSC6 (singular, "Highwire Press", *correct*). – Robert Andrews May 31 '18 at 20:28
  • OR should be totally valid search behaviour, as should double quotes for verbatim. Has been like that for decades, I think. Bing shouldn't have to guess my intent, I'm *giving* it explicitly. – Robert Andrews May 31 '18 at 20:31