Programmable Search Engine Blog
The latest news, updates and tips from the Programmable Search Engine team
Specifying patterns for your Custom Search Engine
Thursday, February 21, 2008
Posted by: Vrishali Wagle, Software Engineer
Creating a basic Custom Search Engine (CSE) is very easy. You enter a list of sites, select a few basic preferences, and you are done, right? But in fact there's more to Custom Search -- consider it a very powerful way of building your own search engine on top of Google search. You can exclude sites, add labels for drill-down and even change the ranking of results for your search engine. In this blog post, we look at the basic element of Custom Search -
URL patterns
URL patterns
specify the part of the web you want to search or exclude from your search. Custom Search is based on approximation algorithms that use these patterns to give you your customized results.
Consider the "
I Love Veggies
" search engine that we created. Here's how the "
I Love Veggies
" search engine made use of patterns effectively:
Be very specific. Use the longest possible pattern for specifying a site. For example, in the "I Love Veggies" search engine, we wanted to search all of www.goveg.com, so we added "www.goveg.com/*" as a pattern. But we wanted to search only the vegetarian part of the "allrecipes.com" site. So instead of adding all of "allrecipes.com/*" we added the more specific "allrecipes.com/Recipes/Everyday-Cooking/Vegetarian/*".
Specify multiple pages in a site with a "*" at the end of the pattern. If you specify just "www.goveg.com", Custom Search will search just the single page http://www.goveg.com. You need to remember this only if you are write your XML file of annotations directly. If you are using the Control Panel, it automatically adds the "/*" at the end for you, unless you indicate otherwise.
Sometimes, you might have a few hosts on a domain with the same path that you want to search. In our example, we wanted to search "mideastfood.about.com/od/vegetarianrecipes/*" and "indianfood.about.com/od/vegetarianrecipes/*". In such a case it is better to specify these patterns individually instead of a very general "*.about.com/od/vegetarianrecipes/*" as more specific the patterns, better the approximation.
You can only use the * in the hostname at the beginning of the pattern and it can only represent a full token. For example, "*.about.com/*" is a valid pattern and so is "*.food.about.com/*". However, "*ood.about.com/*" is not valid, nor is "food.*.about.com/*".
Keep reading this blog for more tips and tricks as we develop our "
I Love Veggies
" search engine. If you have specific questions or feature requests you can visit our
Help Center
or ask a question on the
Discussion group
.
Promoting useful information and web pages
Friday, February 8, 2008
Posted by: Rajat Mukherjee, Group Product Manager
Webmasters often want the ability to promote specific information or web pages when users search for specific things via their Custom Search Engine (CSE).
Here are some examples where this is useful:
* You have a travel site, and want to draw attention to a spring promotion above the search results for keywords "hawaii", "maui", "kona". You want a nice image of the beach and the three most popular packages listed right on top.
* You've created a soccer search engine, and you want soccer fans to quickly get to the results of the Cup of Nations tournament in Ghana for queries [africa], [ghana], and [cup of nations]
* Your company just launched a brand new product, and you'd like people to know about it via a headline link to your product blog post when they search for older products in the same category.
We've always had the ability to do this in Custom Search (via a feature called Subscribed Links) but now, we've tried to make it a little easier for you.
When you go to to the
control panel for your CSE
, you'll see a new option in the "Preferences" section towards the bottom of the "Basics" tab. Selecting this option will enable your Subscribed Link to be triggered in your CSE for the keywords you've specified. If you don't already have a Subscribed Link defined, you can create one in minutes. Just specify the trigger keywords, the summary text you'd like displayed, and the URL of the target web page when the link is clicked.
When visitors search on your CSE using the special trigger keywords, your special link will show up right on top of the results, where they won't miss it.
You can manage your Subscribed Link via the
Subscribed Link console
. Check the
developer documentation
for advanced options. Remember that subscribed links display differently on your CSE (above the results) versus on Google.com (inline).
Displaying the most relevant refinements
Monday, January 7, 2008
Posted by: Vrishali Wagle, Software Engineer
Over the past year, a number of you have asked to show only the matching refinements above Custom Search results. Today we're announcing that very feature: You can have as many FacetItems as you like in the
XML definition of your CSE
and control the number that display on a search page using this feature. Just add a "top_refinements" attribute to your context definition's CustomSearchEngine tag.
<CustomSearchEngine top_refinements="n">
</CustomSearchEngine>
Where n is the number of refinements you want to show.
For example, consider the context definition of a CSE I created:
http://vrishali.googlepages.com/food_context.xml
. It has sixteen FacetItems -- however, the top_refinements is set to 4. This means that it will display the top four matching refinements for every query. Check out the query
chicken
. Observe how the refinements displayed at the top are different for the query
food safety
.
Now consider the default implementation of the same CSE, that is without the top_refinements option:
http://vrishali.googlepages.com/food_context_no_top_refinements.xml
. All queries in this search engine will display the same refinements, for example
chicken
and
food safety
.
This feature is enabled for Linked CSEs as well as Google stored CSEs. To use it in your Google Stored CSE, download the context file in the "Advanced" tab of your control panel, add the "top_refinements" attribute to the CustomSearchEngine tag in your XML and upload the modified file.
If you don't want to display refinements at the top of the search results, turn them off by setting top_refinements="0". Your search results will still be labeled with the refinements that match.
As always,
let us know
what you like, or don't like, about this feature!
Ads now in harmony with search results
Monday, December 17, 2007
Posted by: Tom Duerig, Software Engineer
Many folks have pointed out that all the results on the page -- both the search results and the advertisements -- should be appropriately customized so that the ads are in sync with the search results. We are happy to tell you that this is now indeed the case. Keywords that you use to tune search results will also be used to tune the ads.
To demonstrate the power of keywords for tuning ads, we've created 3 search engines. Note the differences in ads when we search for [leash] on all three:
A search engine about children, with the keywords [child children]:
A search engine about dogs, with the keywords [dog dogs]:
And, a search engine about surfing, with the keywords [surf surfing]:
So, keywords are even more important than before to your search engine. Make sure that you choose the keywords that provide the best overall search experience!
Custom Search in your language of choice
Tuesday, November 20, 2007
Posted by Matt Wytock, Software Engineer
Since we launched Google Custom Search last year, webmasters and businesses around the world have been able use specific language controls to build customized search experiences. However, the Custom Search administration console was only available in English -- until now. Starting today, the Custom Search platform supports 40 languages in close to 80 countries worldwide.
Webmasters can use CSE to create tailored search experiences on community web sites; businesses can add hosted site search to their web sites; users can add search to their
blogs
and web pages; and developers can build search right into their applications with the
Custom Search APIs
. And there's no software to install or hardware to maintain. Custom Search engines can be built in minutes and are easy to customize and manage. You can also control the appearance of the search results to match the look and feel of your web site. Now, you can administer your favo(u)rite CSE in the language of your choice.
Custom Search is available as a free, ads-supported version, and through Custom Search Business Edition (CSBE). With CSBE, further customization of search results is possible using an XML API, and ads are optional. CSBE offers options for email and phone support. This launch also brings Custom Search Business Edition (CSBE) to your country. So if you're looking for fast, easy and relevant search for your website in your language, you'll be pleased with this launch.
As always, we'd love your feedback. Visit our
User Group
to tell us more about your Custom Search implementation.
Custom Search Results Overlay
Tuesday, October 30, 2007
Posted by: Matt Wytock, Software Engineer
The ability to integrate Custom Search with your site is an important feature , and we recently added a new option to the Code tab that makes this integration easier. Using AJAX techniques, you can now get your search results in an overlay that appears on top of the page containing the search box.
Here's an example
.
Go to the Code tab of your search engine's
control panel
and select "Host results on a non-Google site" and "overlay" to get this new code.
Behind the scenes, this is powered by the
AJAX Search API
, which gives you complete control of your search results and is
easy to use
with Custom Search.
Custom Search for Salesforce Developers
Tuesday, September 18, 2007
Posted by: Ryan Pollock, Product Marketing
I recently met with Adam Gross, VP of Developer Relations at
Salesforce.com
, to hear how
developer.salesforce.com
uses Google Custom Search. The company is building a community and knowledge base for developers on its Apex platform, and needs a search engine across a variety of content sites, including blogs and wikis. Adam says that Custom Search Business Edition is ideal for their needs, since it's easy to search multiple sites and access search results through an XML API. From the time he learned about Custom Search Business Edition, Adam says it only took a few days to install and create a look and feel for search results that matches the rest of the site.
To hear the story in Adam's own words, check out this video.
And if you're interested in hearing more about our work with Salesforce, we're at their
Dreamforce conference
this week, so come by to see us.
Archive
2024
Apr
2023
Dec
Oct
Jun
2022
Aug
Jul
Jun
Feb
2021
Apr
Jan
2020
Nov
Oct
Sep
Aug
Jun
Apr
2019
Jul
Jun
Apr
2018
Jul
2017
Jul
Feb
2014
Mar
2013
Dec
Oct
Sep
Mar
Jan
2012
Aug
Jun
May
Mar
Feb
Jan
2011
Dec
Nov
Oct
Sep
Aug
Jul
Jun
Apr
Mar
Feb
Jan
2010
Dec
Nov
Oct
Sep
Aug
May
Apr
Mar
Feb
Jan
2009
Dec
Nov
Oct
Sep
Aug
Jul
Jun
May
Apr
Mar
Feb
Jan
2008
Dec
Nov
Oct
Sep
Aug
Jun
May
Apr
Mar
Feb
Jan
2007
Dec
Nov
Oct
Sep
Aug
Jul
Jun
May
Apr
Mar
Feb
Jan
2006
Dec
Nov
Useful links
Programmable Search Engine
Help Center
Support Forum
Developer Documentation
Google AdSense Blog