您的位置:首页 > 编程语言 > Go语言

google搜索方法

2004-09-10 21:21 489 查看
因为要做新一代web的课程作业,看了一下google的API介绍,才有机会第一次仔细看了google提供的搜索方式。果然google之强大出乎我的意料,好多功能从未善加利用,以致以往工作效率低下,实在惭愧。

Special Query CapabilityExample QueryDescription
Include Query Term Star Wars Episode +I If a common word is essential to getting the results you want, you can include it by putting a "+" sign in front of it.

Exclude Query Termbass -musicYou can exclude a word from your search by putting a minus sign ("-") immediately in front of the term you want to exclude from the search results.
Phrase Search"yellow pages"Search for complete phrases by enclosing them in quotation marks or connecting them with hyphens. Words marked in this way will appear together in all results exactly as entered.

Note: You may need to use a "+" to force inclusion of common words in a phrase.

Boolean OR Searchvacation london OR parisGoogle search supports the Boolean "OR" operator. To retrieve pages that include either word A or word B, use an uppercase OR between terms.
Site Restricted Searchadmission site:www.stanford.eduIf you know the specific web site you want to search but aren't sure where the information is located within that site, you can use Google to search only within a specific web site.

Do this by entering your query followed by the string "site:" followed by the host name.

Note: The exclusion operator ("-") can be applied to this query term to remove a web site from consideration in the search.
Note:
Only one site: term per query is supported.

Date Restricted SearchStar Wars daterange:2452122-2452234If you want to limit your results to documents that were published within a specific date range, then you can use the "daterange: " query term to accomplish this. The "daterange:" query term must be in the following format:

daterange:<start_date>-<end date>


where


<start_date> = Julian date indicating the start of the date range
<end_date> = Julian date indicating the end of the date range


The Julian date is calculated by the number of days since January 1, 4713 BC. For example, the Julian date for August 1, 2001 is 2452122.

Title Search (term)intitle:Google searchIf you prepend "intitle:" to a query term, Google search restricts the results to documents containing that word in the title. Note there can be no space between the "intitle:" and the following word.
Note: Putting "intitle:" in front of every word in your query is equivalent to putting "allintitle:" at the front of your query.

Title Search (all)allintitle: Google searchStarting a query with the term "allintitle:" restricts the results to those with all of the query words in the title.
URL Search (term)inurl:Google searchIf you prepend "inurl:" to a query term, Google search restricts the results to documents containing that word in the result URL. Note there can be no space between the "inurl:" and the following word.
Note: "inurl:" works only on words , not URL components. In particular, it ignores punctuation and uses only the first word following the "inurl:" operator. To find multiple words in a result URL, use the "inurl:" operator for each word.
Note: Putting "inurl:" in front of every word in your query is equivalent to putting "allinurl:" at the front of your query.

URL Search (all)allinurl: Google searchStarting a query with the term "allinurl:" restricts the results to those with all of the query words in the result URL.
Note: "allinurl:" works only on words, not URL components. In particular, it ignores punctuation. Thus, "allinurl: foo/bar" restricts the results to pages with the words "foo" and "bar" in the URL, but does not require that they be separated by a slash within that URL, that they be adjacent, or that they be in that particular word order. There is currently no way to enforce these constraints.

Text Only Search (all)allintext: Google searchStarting a query with the term "allintext:" restricts the results to those with all of the query words in only the body text, ignoring link, URL, and title matches.
Links Only Search (all)allinlinks: Google searchStarting a query with the term "allinlinks:" restricts the results to those with all of the query words in the URL links on the page.
File Type FilteringGoogle filetype:doc OR filetype:pdfThe query prefix "filetype:" filters the results returned to include only documents with the extension specified immediately after. Note there can be no space between "filetype:" and the specified extension.
Note: Multiple file types can be included in a filtered search by adding more "filetype:" terms to the search query.

File Type ExclusionGoogle -filetype:doc -filetype:pdfThe query prefix "-filetype:" filters the results to exclude documents with the extension specified immediately after. Note there can be no space between "-filetype:" and the specified extension.
Note: Multiple file types can be excluded in a filtered search by adding more "-filetype:" terms to the search query.

Web Document Infoinfo:www.google.com The query prefix "info:" returns a single result for the specified URL if it exists in the index.
Note: No other query terms can be specified when using this special query term.

Back Linkslink:www.google.com The query prefix "link:" lists web pages that have links to the specified web page. Note there can be no space between "link:" and the web page URL.
Note: No other query terms can be specified when using this special query term.

Related Linksrelated:www.google.com The query prefix "related:" lists web pages that are similar to the specified web page. Note there can be no space between "link:" and the web page URL.
Note: No other query terms can be specified when using this special query term.

Cached Results Pagecache:www.google.com webThe query prefix "cache:" returns the cached HTML version of the specified web document that the Google search crawled. Note there can be no space between "cache:" and the web page URL.
If you include other words in the query, Google will highlight those words within the cached document.

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: