/// <summary> /// Activates any index that needs activation, i.e. have been added with <seealso cref="activateIndex(long)"/>. /// </summary> public override void Close() { if (_indexesToActivate != null) { foreach (long indexId in _indexesToActivate) { try { _indexingService.activateIndex(indexId); } catch (Exception e) when(e is IndexNotFoundKernelException || e is IndexActivationFailedKernelException || e is IndexPopulationFailedKernelException) { throw new System.InvalidOperationException("Unable to enable constraint, backing index is not online.", e); } } } }