graph detector - parameter for index, and caching individual matchers