Our organization currently uses the Google Custom Search system to provide automatic suggestions, and we have about 3 qualifying labels configured in our CSE. We used to use WebSearch and SearchControl, and WebSearch has a setSiteRestriction method that allows us to specifically select the refinement label: - http://code.google.com/apis/websearch/docs/reference.html#_class_GwebSearch
Previous code example:
var searchControl = new google.search.SearchControl();
var webSearch = new google.search.WebSearch();
var refinement="Support";
(some other variables declaration here including 'product')
switch(product)
{
case "10000":
refinement = "Support1";
break;
case "10200":
refinement = "Support1";
break;
case "10001":
refinement = "Support2";
break;
default:
break;
}
webSearch.setSiteRestriction('cseId', refinement);
......
CustomSearchControl, WebSearch, , , case switch. , , , , , . !:)