Sorry for posting this as an answer, but I can't post replies yet, and this is really a reply as it does not provide an answer to the question, but rather a clarification to the answer by Vardhaman.
I tried Vardhamans code for getting the search setting without setting it, but it didn't work for me. It returned the error:
"Uncaught Error: The property or field has not been initialized. It has not been requested or the request has not been executed. It may need to be explicitly requested."
By changing ctx.load(web) to ctx.load(props) I got it to work. Seems the real properties aren't accessible until you load the props. I also wrapped this in a SP.SOD.executeFunc which was needed for me.
SP.SOD.executeFunc('sp.js', 'SP.ClientContext', loadStuff);
function loadStuff(){
var ctx = new SP.ClientContext.get_current();
var web = ctx.get_site().get_rootWeb();
var props = web.get_allProperties();
ctx.load(props);
ctx.executeQueryAsync(function () {
alert(props.get_item("SRCH_ENH_FTR_URL"));
},
function() {
alert("failed");
});
}
Hope this helps someone who got the same error as me, and excuse me for the new answer.