pub async fn remove_index(&self, name: &str) -> Result<()> {
        let indexes = {
            let indexes = self.indexes.load();

            let mut indexes = indexes.as_ref().clone();
            if let Some(old) = indexes.remove(name) {
                old.destroy().await?;
            };

            indexes
        };

        self.indexes.store(Arc::new(indexes));

        {
            self.declarations.lock().remove(name);
        }

        Ok(())
    }
/// Removes an index to the index from the engine with a given name.
///
/// This internally calls `Index.destroy()` to cleanup writers.
Removes an index to the index from the engine with a given name.
This internally calls `Index.destroy()` to cleanup writers.
Removes an index to the index from the engine with a given name . This internally calls ` Index . destroy () ` to cleanup writers .
pub async fn remove_index(&self, name: &str) -> Result<()> {
        let indexes = {
            let indexes = self.indexes.load();
            let mut indexes = indexes.as_ref().clone();
            if let Some(old) = indexes.remove(name) {
                old.destroy().await?;
            };
            indexes
        };
        self.indexes.store(Arc::new(indexes));
        {
            self.declarations.lock().remove(name);
        }
        Ok(())
    }
pub async fn remove_index ( & self , name : & str ) -> Result < ( ) > { let indexes = { let indexes = self . indexes . load ( ) ; let mut indexes = indexes . as_ref ( ) . clone ( ) ; if let Some ( old ) = indexes . remove ( name ) { old . destroy ( ) . await ? ; } ; indexes } ; self . indexes . store ( Arc :: new ( indexes ) ) ; { self . declarations . lock ( ) . remove ( name ) ; } Ok ( ( ) ) }
Removes an index to the index from the engine with a given name.
Removes an index to the index from the engine with a given name .
&self
name
&str
&self
name
&str