Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more

Navigation [hide] [expand]
Area: Optimizely Search & Navigation
ARCHIVED This content is retired and no longer maintained. See the latest version here.

You can delete individual documents from the index using the IClient interfaces Delete method. For example, the code below deletes a BlogPost with ID 42.

C#
client.Delete<BlogPost>(42);

You can delete all documents that match criteria defined in a filter expression. For example, the code below deletes all documents of type BlogPost, as well as those of a type inheriting from BlogPost that are tagged with "Banana".

C#
client.Delete<BlogPost>(x => x.Tags.Match("Banana"));

Related topic

Last updated: Nov 16, 2015