1

Using API, if you search for 'orange icon' in the title:

https://api.stackexchange.com/2.1/search?order=desc&sort=activity&intitle=orange%20icon&site=stackoverflow (5results)

but a site search with: +title:orange +title:icon :

https://stackoverflow.com/search?q=%2Btitle%3Aorange+%2Btitle%3Aicon&submit=search (9 results)

it's strange that it differs? (the 5 above results are in the 9)

but I wanted to know, onsite search title:orange title:icon gives results with at least one term in the title, with the the 9 above in first (5000+)

How to do the equivalent with API? or maybe the API doesn't support OR, they are done by merging in the site search?

Thx

1 Answer 1

0

https://api.stackexchange.com/2.1/search?order=desc&sort=activity&intitle=orange%20icon&site=stackoverflow is searching for "orange icon" (from intitle=orange%20icon)

https://stackoverflow.com/search?q=%2Btitle%3Aorange+%2Btitle%3Aicon&submit=search is searching for "orange" and "icon"

The subtle difference is the first is looking for words with a single space between them (%20) and the second is looking for those words anywhere in the title.

3
  • and any solution to have api find for multiple words in title?, api.stackexchange.com/2.1/… is not working better
    – caub
    Nov 12, 2012 at 22:23
  • @cyril, actually, I can't seem to find anything. intitle=orange&intitle=icon seems to act as an OR (30 returned question ids). perhaps someone who works more with the API can help
    – SeanC
    Nov 14, 2012 at 15:56
  • o right : &intitle=orange&intitle=icon, tried many things except that, seems doing a 'OR' but still less than the 5000+ on SO, mysterious
    – caub
    Nov 14, 2012 at 16:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .