Setting the search context was a little tricky.
It appears as though by default, any searches are executed as though in the splunk "search" application (/search/search in the rest API or web GUI).
The context must be changed during initialization of the service object.
There is a method which takes a ServiceArgs object, and a method which takes a Map of String, Object. Even though the ServiceArgs one has explicit statements like "setHost", and fits the scheme of the rest of the API, it's marked as deprecated. Looking at the Map-based constructor provides all of the items it will digest. In order to set the app context, it was necessary for me to put the following keys:
app, host, port.
... View more