I created a function in js and call it several times, however, once the searchmanager ID is used, the mvc.js will return an error the next time. As a result, I would like to know how can I remove the searchmanager object after search in Splunk?
function ajax(id, ids) {
var scope1 = new SearchManager({
"id": "scope1",
"status_buckets": 0,
"search": "`GetSpecDeploylog("+id+")`",
"app": utils.getCurrentApp()
}, {
tokens: true,
tokenNamespace: "submitted"
});
var r = scope1.data('results');
r.on('data', function(results) {
BuildInfo(r.data().rows[0], '#build' + ids, [ids - 1]);
DomainRun(r.data().rows[0], '#chart' + ids, '#legend' + ids);
});
}
... View more