Google's search operator AND - operators

I am trying to figure out how exactly google's search operator AND works for an application that I am currently building.
I found this article:
https://supple.com.au/tools/google-advanced-search-operators/
that says that google uses AND operator as a default operator when searching
however I am trying some examples and this doesn't seem to be the whole story
For example, when I search for:
Google search term: perth tourism sea surfing
it gives me more search results than:
Google search term: perth tourism sea
How is that possible, I would expect that AND operator would narrow the search results not increase them (this is what I would expect from an OR operator)
Any ideas of why this is happening?

Check this resource out: https://www.webpagefx.com/blog/google-2/google-advanced-search-operators-cheat-sheet/
I have a feeling the default behaviour is and/or, but I am somewhat speculating.
You could incorporate some quotes such as perth tourism "sea surfing" but I might try something such as allintext: perth tourism sea surfing. That would be more machine-friendly than worrying about where to include quotes. Quotes may also constrain the order of your keywords. For example, "I like cats" will find an exact match (and not return pages with I cats like).
Additionally, I think you might not be using AND as it is documented on the site you linked.
The AND operator functions with the same logic as an AND operator - similar to the OR operator, it must be in all CAPS to work. Google will look for all conditions to be met before returning any results.
e.g. site:twitter.com AND intitle:SuppleSolutions AND inurl:Saijo_George where all the 3 conditions should be satisfied for Google to return any result.
Your search terms should probably be:
perth AND tourism AND sea AND surfing
You could add to your logic to replace the search string's characters with AND but before that, I would probably see if allintext: perth tourism sea surfing is viable.

Apparently I think that it is a problem of personalization and localization
I did the following things:
1. I open an incognito window
2. I signed out from all google accounts
3. I opened google.com rather than google.xx using www.google.com/ncr
4. I searched "perth" AND "tourism" AND "sea" and "surfing"
which seems to narrow down the results from searches with less terms.

Related

Deezer API search: weird result in advance search

I want to use the Deezer API to find a good match for a track using its title & artist, so I tried to use the advanced search described in http://developers.deezer.com/api/search#infos
But this api returns a lot of erratic results. For example:
https://api.deezer.com/search?q=artist:%27jeff%20mills%27 //Completely à côté de la plaque
https://api.deezer.com/search?q=jeff%20mills //Nice
It's pretty weird that when using the advanced search the result is less accurate than without it...
So is there a way to receive an accurate result for a track by specifying the artist and the title?
Thanks
Actually, it is not simple quotes that should be used but double quotes, and it works. We will update the documentation about this point, thank you!

Appcelerator Cloud Services - Find string in photos object custom field

I'm having trouble using the query/search capabilities of Cloud.photos, more specifically, finding a way of search for a string in title field.
After reading this: http://docs.appcelerator.com/cloud/latest/#!/guide/search_query, I was able to perform querys with $regex:
where: {title: {'$regex' : '^' + searchterm}},
But works only if the search term is in the beginning of the title, and it's case sensitive (I'm obviously a complete regex newbie).
Also tried search API with no luck. I didn't find which were the searchable fields.
So, I'm in some sort of dead end. I'm looking for a SQL like similar funcionality, where I can perform a search of a term and if matches regardless of the position and whether it is upper or lower case.
Thanks in advance.
see the release notes here for 11 Apr 2013
http://docs.appcelerator.com/cloud/latest/#!/guide/acs_releasenotes
it cannot be done any other way because the query would be too inefficient

How do I access the "See Also" Field in the Wiktionary API?

Many of the Wiktionary pages for Chinese Characters (Hanzi) include links at the top of the page to other similar-looking characters. I'd like to use the Wiktionary API to send a single character in the query and receive a list of similar characters as the response. Unfortunately, I can't seem to find any query that includes the "See Also" field. Is this kind of query possible?
The “see also” field is just a line of wiki code in the page source, and there is no way for the API to know that it's different from any other piece of text on the page.
If you are happy with using only the English version of Wiktionary, you can fetch the wikicode: index.php?title=太&action=raw, and then parse the result for the template also. In this case, the line you are looking for is {{also|大|犬}}.
To check if the template is used on the page at all, query the API for titles=太&prop=templates&tltemplates=Template:also
Similar templates are avilable in more language editions of Wiktionary, in case you want to use other sources than the English one. The current list is:
br:Patrom:gwelet
ca:Plantilla:vegeu
cs:Šablona:Viz
de:Vorlage:Siehe auch
el:Πρότυπο:δείτε
es:Plantilla:desambiguación
eu:Txantiloi:Esanahi desberdina
fi:Malline:katso
fr:Modèle:voir
gl:Modelo:homo
id:Templat:lihat
is:Snið:sjá einnig
it:Template:Vedi
ja:テンプレート:see
no:Mal:se også
oc:Modèl:veire
pl:Szablon:podobne
pt:Predefinição:ver também
ru:Шаблон:Cf
sk:Šablóna:See
sv:Mall:se även
It has been suggested that the WikiData project be expanded to cover Wiktionary. If and when that happens, you might be able to query theWikiData API for that kind of stuff!

Yahoo Answers API - questionSearch - Filter out certain words

Is the Yahoo Answers API very limited on its functionality, or the documentation is incomplete?
Here is API ref:
http://developer.yahoo.com/answers/V1/questionSearch.html
I'd need to be able to retrieve questions that contain termA or termB but neither termC or termD.
Example URL for questions containing termA:
http://answers.yahooapis.com/AnswersService/V1/questionSearch?appid=YahooDemo&query=termA
Also, further information on the API will be helpful.
Thanks!
Some Googling showed that the query supports AND, OR, ANDNOT and brackets. So for a query that returns anything on cats but nothing on dogs:
http://answers.yahooapis.com/AnswersService/V1/questionSearch?appid=YahooDemo&query=cats+ANDNOT+dogs
As for the brackets, to query for anything that mentions cats or dogs but not fish:
http://answers.yahooapis.com/AnswersService/V1/questionSearch?appid=YahooDemo&query=(cats+dogs)+ANDNOT+fish

Google Custom Search API, Howto return country specific results only

I am making some PHP code which takes a given search phrase and url and searches through the google search results until it finds the url (only first 100 results). My problem is, this is only working for the US. I have tried adding the "&cr=" option, but it still on returns US results.
The full URL I am using for the request is:
https://www.googleapis.com/customsearch/v1?key=API_KEY&cx=CX_VALUE&q=KEYWORD&cr=COUNTRY&alt=JSON
Does anyone have any experience with this? I want to be able to see UK results. Tried inserting &cr=countryUK , but still only does US results.
Thanks :)
Regards,
Stian
Use the gl=<country code> param to limit it to your country of choice (so gl=gb for the uk).
More info here:
http://googleajaxsearchapi.blogspot.com/2009/10/web-search-in-your-country.html