More power to metadata

Last year, we introduced structured custom search. If you mark up your pages with custom metadata attributes, you can render them with your search results, and also restrict results based on specific attribute values.

Today, we’re happy to be releasing 2 additional metadata features:

  • Sort by Attribute: order search results based on values of specific attributes
  • Restrict to Range: only return search results with attributes within a defined range

For example, if you mark up your pages with custom metadata attributes, like dates, ratings and prices, you can order your search results by these attributes, such as sort by date, bias towards highly rated items, or restrict to a specific price range.

SignonSanDiego.com, a California news portal, uses the new Sort by Attribute feature in conjunction with the Google Custom Search Element to render recent stories with photos in the results:


SignOnSanDiego uses the new sort operator. The sort operator comes in several flavors, from a mild bias to strict sort ordering; SignonSanDiego.com uses a strong bias towards the publication date to ensure readers see not only the most relevant, but also timely news.

To implement the new features, you must mark up the pages you are searching with the attributes you want to use. You can do this via PageMaps; the PageMap used by SignOnSanDiego looks like this:


SignOnSanDiego’s publication date is stored in the DataObject of type ‘date’ as the Attribute named ‘sdate’; to specify this field you combine the type and name into a single field ‘date-sdate’. To apply Sort by Attribute over date-sdate, you set the sort option in the search code for the Element as shown below:

...
var options = {};
options[google.search.Search.RESTRICT_EXTENDED_ARGS] = {'sort': 'date-sdate:d:s'};
customSearchControl = new google.search.CustomSearchControl('000525776413497593842:aooj-2z_jjm', options);
...

The sort option {‘sort’: ‘date-sdate:d:s’} takes a combined attribute name, like ‘date-sdate’, and several optional parameters separated by colons. In this case, SignOnSanDiego has specified sorting in descending order (d) using the strong bias (s) flavor of the operator. Without qualifiers, the default is to use a descending order with a hard sort. You can also choose to sort in ascending order (a), or use a weak sort flavor (w) or explicitly specify a strict hard sort (h).

The sort option also enables the Restrict to Range feature. For example a site like SignOnSanDiego might enable users to search for articles published in the last week. To implement this, you can set the sort options to “date-sdate:r:20101206:20101213”. This again uses the combined attribute name (date-sdate), but instead restricts to the range (r) of specified values (20101206:20101213). Multiple operators can be combined in the sort option using a comma. For example, to combine SignOnSanDiego’s strong bias with the above date restriction, you would specify “date-sdate:d:s,date-sdate:r:20101206:20101213”.

The Sort by Attribute and Restrict to Range features are a powerful new set of options that gives you a great deal of control over your search application, allowing you to use custom attributes to order and restrict your search results in very powerful ways for your users. For example, a movie review site can display the most highly rated movies released within the last week by combining distinct attributes in the sort operator, e.g., “review-rating,release-date:r:20101206:20101213”.

A few more tips:
1. With custom data rendering, you can customize your results even further.
2. You can always validate your metadata markup with the use of the rich snippet preview tool.
3. If you are not using the Element, you can always use the same sort options in the sort URL parameter, e.g., “&sort=date-sdate”.

For more details on these new features, please refer to our documentation. As always, we’re looking to you for feedback.

Google Code-in Check-in

We wanted to do a quick check-in on Google Code-in to let you know how the contest is going. We are just over four weeks into the contest – more than halfway. We’re quite excited about the participation thus far and hope more of you are planning to get involved in the coming days.
As of today we have more than 290 participants who have completed at least one task. There have been 813 tasks completed by all our student participants so far for a combined point total of 1,605. Points are calculated according to difficulty of the task: “Hard” tasks are worth 4 points, “Medium” tasks are worth 2 points, and “Easy” tasks are worth 1 point.
We’re also quite impressed with the international representation we’ve gotten from the contest – over 75% of our participants are from outside the United States. Our top 10 participating countries in order are: United States, Romania, Bulgaria, Russian Federation, Poland, Canada, Germany, India, Italy, and Belarus.
We would love to have more students participate! There are currently over 400 tasks that are unclaimed and need someone to work on them.
Remember, the contest ends on January 10, 2011. Don’t delay, claim a task today!

WindowBuilder becomes new open source project with major code contribution to Eclipse Foundation

When Google acquired Instantiations in August 2010, everyone knew about our Java Eclipse products. Shortly after we joined, we talked about how best to help developers now that we are part of Google. We have always wanted to get these tools in more developers’ hands. So, back in September we decided to give them away for free! The community response has been fantastic. With that done, we asked ourselves, how could we make a good thing even better? How about by open sourcing the code and creating two new Eclipse projects!

Today we are announcing Google’s donation of the source code and IP for two of these products to the open source community through the Eclipse Foundation. This donation includes WindowBuilder, the leading Eclipse Java GUI Designer, and CodePro Profiler, which identifies Java code performance issues. Specifically, the WindowBuilder Engine and designers for SWT and Swing. All in all, this is a value of more than $5 million dollars worth of code and IP.

The Eclipse Foundation’s Executive Director, Mike Milinkovich, states that, “this is clearly a significant new project announcement, and very good news for Java developers using Eclipse. It has been impressive to see the continued growth and popularity of WindowBuilder, as this product has always filled a much needed gap in the Eclipse offerings. We look forward to it appearing in an Eclipse release soon. We’re very pleased with Google’s generous support of Eclipse, and the Java developer community around the world.”

One of the exciting aspects of innovating in the open source arena is that customers benefit from a full community. We are very excited to see the diverse collection of companies and individuals that have already expressed an interest in contributing to these projects. Commercial level support is important to many customers. Genuitec, makers of MyEclipse, intends to offer commercial support for the various WindowBuilder based products including the SWT, Swing Designer and even the GWT Designer from Google. Please sign up on the Genuitec site for more information. Similarly, OnPositive intends to offer commercial support for CodePro Profiler, as well as lead as the committers on the Eclipse Community Project. Sign up on the OnPositive site for more information.

“Genuitec is pleased to offer commercial support for WindowBuilder-based products – Swing, SWT and GWT – in early 2011 for companies who wish to continue a paid support contract once their Google support expires. We’ve been involved with the Eclipse Foundation since the beginning, so we are very familiar with these products. Thus, providing commercial support for this product line is a natural fit for us,” said Maher Masri, President of Genuitec.

“Over the years OnPositive has built up unique experience with the CodePro Profiler and we are excited to offer commercial support for it. Google’s donation ensures that Java developers can build faster applications,” said Pavel Petrochenko, President of OnPositive.

WindowBuilder

WindowBuilder is regarded as the leading GUI builder in the Java community (winning the award for Best Commercial Eclipse Tool in 2009). It includes powerful functionality for creating user interfaces based on the popular Swing, SWT (Standard Widget Toolkit), GWT (Google Web Toolkit), RCP and XWT UI frameworks.

CodePro Profiler

CodePro Profiler is an Eclipse-based Java application profiling tool that helps developers identify performance issues early in the development cycle and find CPU and algorithmic bottlenecks, memory leaks, threading issues, and other concurrency-related problems that can slow down an application or cause it to hang.

Both WindowBuilder and CodePro Profiler will become Eclipse projects in the first half of 2011. Once each one is set up as a project and available for download from the Eclipse site, the products will be accessible to use as open source code under the the standard Eclipse license. I am looking forward to leading the WindowBuilder project.

If you have any questions, you can learn more at this FAQ or we look forward to hearing from you on the forums.