The Introduction to FAST Search API provides an introduction on how to use the FAST API. FAST stores documents in a collection. We usually perform searches on a collection. But there are times when we want all documents in a collection. This article explains how.

The maximum number of documents in a FAST response is 4020. We page through the results, 100 documents at a time.

While retrieving a large number of documents (100), there is a possibility of the query timing out. If a timeout occurs, retry the Search operation.

The result from FAST is a collection of IDocumentSummary. IDocumentSummary has a collection of fields. We retrieve the fields, name and country.

While iterating through the document collection, there is a possibility of exception, even though MoveNext method returns true. I believe this is a bug with the API. Silently ignore the exception.

The HttpSearchEngine class also exposes the FetchDocuments method. Though the FetchDocuments method succeeds, it is not possible to retrieve the document collection from the result. This can be another bug with the API. In any case, FetchDocuments is an undocumented part of the FAST Search API.

Getting all documents from a FAST collection
Tagged on: