IFulltextSessionDeleteTDocument(Int32) Method

Schedule the documents with the given id(s) for deletion. The documents will be deleted when FlushChanges is called.

Definition

Namespace: SphinxConnector.FluentApi
Assembly: SphinxConnector (in SphinxConnector.dll) Version: 6.1.0
C#
void Delete<TDocument>(
	params int[] documentIds
)

Parameters

documentIds  Int32
The id(s) of the document(s) to delete.

Type Parameters

TDocument
The type of document for which the ids are provied.

Example

Delete the documents with the id's 4, 8, and 15:
C#
using (IFulltextSession fulltextSession = fulltextStore.StartSession())
{
    fulltextSession.Delete<Product>(4, 8, 15);

    fulltextSession.FlushChanges();
}

Exceptions

ArgumentNullExceptionOccurs when documentIds is null.
ObjectDisposedExceptionOccurs when the session has already been disposed.

See Also