Contents

SKSearchResultsGetInfoInRange

Extracts information from a Search Kit query result.

Declaration

CFIndex SKSearchResultsGetInfoInRange(SKSearchResultsRef inSearchResults, CFRange inRange, SKDocumentRef *outDocumentsArray, SKIndexRef *outIndexesArray, float *outScoresArray);

Parameters

  • inSearchResults:

    The search results whose information you want to extract.

  • inRange:

    The starting ranking and total number of found items to obtain, specified as (Location, Length). ‘Location’ specifies the starting item by ranking, with the top-ranked item having a location of 0. ‘Length’ specifies the total number of items to include in the results. For example, (0,1) indicates the first item, which is also the highest-ranking item. (1,1) indicates the second item, which is also the second-highest-ranking item. (0,5) means to get the first 5 items.

  • outDocumentsArray:

    On output, points to an array of found document URL objects (SKDocumentRefs).

  • outIndexesArray:

    On output, points to an array of indexes in which the found document URL objects reside. Can be NULL on input, provided that your application doesn’t need this information.

  • outScoresArray:

    On output, points to an array of correspondence scores for found items. Can be NULL on input, provided that your application doesn’t need this information.

Return Value

The number of items returned—usually the same number as specified by the length item in the inRange parameter.

Discussion

This function provides results to its output parameters in the order in which they are found, to reduce latency and to support search-as-you-type functionality.

See Also

Legacy Support for Synchronous Searching