The search center URL for this website is stored in the Property folder for this website, in RootWeb you can also set the search center URL for the website.
In 2013, the keys have changed since 2010, now they relate to SRCH_ENH_FTR_URL_WEB and SRCH_ENH_FTR_URL_SITE. The code for installing them looks something like this:
var ctx = new SP.ClientContext.get_current(); var web = ctx.get_site().get_rootWeb(); var props = web.get_allProperties(); props.set_item("SRCH_ENH_FTR_URL_SITE","/sites/search/pages"); web.update(); ctx.load(web); ctx.executeQueryAsync(function () { alert("Search Settings Modified"); }, function() { alert("failed"); });
source share