public IDisposable UnloadIndex(string indexName)
        {
            var unloader = new Unloader(indexName, _unloadedIndices);

            try
            {
                RemoveResources(indexName);

                if (_mappings.ContainsKey(indexName))
                {
                    _mappings.TryRemove(indexName, out MappingResource mapping);
                }

                return(unloader);
            }
            catch (Exception ex)
            {
                unloader.Dispose();
                throw new Exception($"Error on unloading index { indexName }", ex);
            }
        }