 | IFulltextSessionDeleteTDocument Method (TDocument) |
Schedules the given document for deletion. The document will be deleted when
FlushChanges is called.
Namespace:
SphinxConnector.FluentApi
Assembly:
SphinxConnector (in SphinxConnector.dll) Version: 5.4.1
Syntaxvoid Delete<TDocument>(
TDocument document
)
Sub Delete(Of TDocument) (
document As TDocument
)
Parameters
- document
- Type: TDocument
The document to delete.
Type Parameters
- TDocument
- The type of document to delete.
Exceptions
Examples
Delete a given document instance:
private void DeleteProduct(Product productToDelete)
{
using (IFulltextSession fulltextSession = fulltextStore.StartSession())
{
fulltextSession.Delete(productToDelete);
fulltextSession.FlushChanges();
}
}
See Also