Click or drag to resize

IFulltextSessionDeleteTDocument(TDocument) Method

Schedules the given document for deletion. The document will be deleted when FlushChanges is called.

Namespace: SphinxConnector.FluentApi
Assembly: SphinxConnector (in SphinxConnector.dll) Version: 6.0.0
Syntax
void Delete<TDocument>(
	TDocument document
)

Parameters

document  TDocument
The document to delete.

Type Parameters

TDocument
The type of document to delete.
Exceptions
ExceptionCondition
ArgumentNullExceptionOccurs when document is null.
ObjectDisposedExceptionOccurs when the session has already been disposed.
Example
Delete a given document instance: private void DeleteProduct(Product productToDelete) { using (IFulltextSession fulltextSession = fulltextStore.StartSession()) { fulltextSession.Delete(productToDelete); fulltextSession.FlushChanges(); } }
See Also