Dispose

SearchNetworkNode.Dispose method

Releases all resources used by the SearchNetworkNode.

public void Dispose()

Remarks

The operations of the node stop: a call that waits for the search network, for example a synchronous indexing or a search, throws ObjectDisposedException, an asynchronous operation ends without its completion event, and the operations of the shards and the extractors of the node are cancelled. The method waits until the messages that the node handles, the handlers of its events that run, the operations of its shards and its extraction end, and no event of the node occurs afterwards. A handler of an event of the node, or of an index, that disposes the node does not wait: a thread of the node may wait for the thread of the handler, and the work of the node may still be ending when the method returns.

The methods Start, ConfigureAllNodes and ConfigureNode of a disposed node and the methods of its indexer and searcher throw ObjectDisposedException.

See Also