IFulltext SessionDeleteTDocument(TDocument) Method
Schedules the given document for deletion. The document will be deleted when FlushChanges is called.
Definition
Namespace: SphinxConnector.FluentApi
Assembly: SphinxConnector (in SphinxConnector.dll) Version: 6.1.0
Assembly: SphinxConnector (in SphinxConnector.dll) Version: 6.1.0
C#
void Delete<TDocument>(
TDocument document
)
VB
Sub Delete(Of TDocument) (
document As TDocument
)Parameters
- document TDocument
- The document to delete.
Type Parameters
- TDocument
- The type of document to delete.
Example
Delete a given document instance:
C#
private void DeleteProduct(Product productToDelete)
{
using (IFulltextSession fulltextSession = fulltextStore.StartSession())
{
fulltextSession.Delete(productToDelete);
fulltextSession.FlushChanges();
}
}Exceptions
| ArgumentNullException | Occurs when document is null. |
| ObjectDisposedException | Occurs when the session has already been disposed. |