Out on the Oracle ECM Forums a question came up about how to find out which index is currently active (from Java). It's quite simple really. Just use the getActiveProperty method of the ActiveIndexState class.
String activeIndexRoot = ActiveIndexState.getActiveProperty("ActiveIndex");
To see this in action grab this Sample Component to Find Your UCM Search Active Index.