Friday, October 10, 2008

Google search tips &as_qdr=d

Now that Google indexes pages extremely fast and saves the date of the first indexing, it would be nice to have more options for restricting search results to a date range. Google only provided three options in the advanced search: see all the pages last updated in the past 3, 6 or 12 months and a difficult-to-use operator (daterange).

The advanced search page has been updated and it shows four more options: find the web pages first indexed in the past day, week, month or in the past 2 months.


If you remove all the uninteresting parameters from the search URL, you'll find that as_qdr is responsible for date restrictions. For example, here's how to restrict a search for [street light pole] to pages first seen by Google's crawler in the past 24 hours:

http://www.google.com/search?hl=en&q=street+light+pole&aq=f&oq=


Note that you'll only find new web pages and not pages that were updated in the past 24 hours. That means you won't find homepages from popular sites or other frequently-updated pages. If the date range is small, you'll mostly find news and blog posts.

The nice thing is that you can change the value of as_qdr to custom intervals. Here are all the possible values of the as_qdr parameter:

d[number] - past number of days (e.g.: d10)
w[number] - past number of weeks
y[number] - past number of years

For example, http://www.google.com/search?hl=en&newwindow=1&q=street+light+pole&btnG=Search&as_qdr=d10 lets you search for pages that contain "street light pole" and were created in the past 10 days.





A finer control (hours) and an option to sort the results by date would make this feature almost perfect.


我们在看网页的时候,有时时政类的消息希望看到的是某个时间点之前的最近报道。比如一天前,一个星期前等。这些就需要将google的搜索结果加个时间过滤器了,怎么办到呢?
  
  举个例子:
  google "obama"得到
  http://www.google.com/search?hl=en&q=obama&btnG=Google+Search&aq=f
  
  在这个网址后面再另外加上&as_qdr=d
  
  http://www.google.com/search?hl=en&q=obama&btnG=Google+Search&aq=f&as_qdr=d
  
  
  &as_qdr=d字段可以自己改动,比如: =d 改成 d5 搜索五天之内的, w5 for five weeks, y5 for 5 years, etc.

No comments: