The setDistributedServerList() method sets the list search peers to which the context current search is distributed.
Note: This method is destructive, so preserve the existing list using getDistributedServerList() .
results = setDistributedServerList( serverList )
|
serverList |
Array |
List of splunkd instance names. |
Undefined
var context = this.getContext();var search = context.get("search");
var serverList = ['https://foobar.splunk.com:8089', 'https://barfoo.splunk.com:8089'];
search.setDistributedServerList(serverList);
context.set('search', search);
return context;