Fast Search Server 2010 for SharePoint –how to drop document from index by its url using Content API and search service.

by Kai 23. May 2012 21:20

Hi 2 all, in this post I am going to show how to drop document from index by its url from .NET code. Of course, you can use docpush tool for this purposes, but you can also do it using Content API from code –

“The Content API for Microsoft FAST Search Server 2010 for SharePoint enables your application to add and remove indexed content within Microsoft FAST Search Server 2010 for SharePoint using the Microsoft .NET Framework. ”

Content API you can download from here (it contains some examples how to use it). Content API has method RemoveDocument that accepts document’s id (this contentid actually). But we have only url, so we must query our document using search service by url, get contentid property and drop it eventually. Lets start (full project at the end of the post).More...