ZDCSearchResultStage

enum ZDCSearchResultStage {}

When you perform a search, the framework actually searches 3 different sources:

  • the local database (for ZDCUser’s & ZDCLocalUser’s)
  • the local cache (from previous queries to the server)
  • the remote server

The matches from each of these sources will be returned to you independently. This gives you the option of populating the UI immediately (with local matches), rather than waiting for a round-trip to the server.

Note

The order of the stages is not guaranteed. You may receive results from stages in any order. However, you will receive a ZDCSearchResultStage_Done at the end.
  • The search results come from a search within the local database.

    Declaration

    Objective-C

    ZDCSearchResultStage_Database

    Swift

    case database = 0
  • The search results come from a search of the in-memory cache populated from previous server responses.

    Declaration

    Objective-C

    ZDCSearchResultStage_Cache

    Swift

    case cache = 1
  • The search results come directly from the server.

    Declaration

    Objective-C

    ZDCSearchResultStage_Server

    Swift

    case server = 2
  • The search request is complete.

    Declaration

    Objective-C

    ZDCSearchResultStage_Done

    Swift

    case done = 3