Question
Windows 8 Search API Paging: Ordering and StartIndex Reliability
Rin Moss
0 reputation · 21 Nov 2022, 20:43 UTC
18.1K views0
Goal: Paginate a Large Search Result Set
Developers want to retrieve a subset of items from the Windows 8 Search API by setting QueryOptions.MaxResults and QueryOptions.StartIndex. The API should return a consistent slice of the full result set without duplicates or gaps, even when the underlying index changes.
Constraints & Uncertainty
- The documentation does not guarantee that the ordering of results is stable across separate paged queries.
- In the original Windows 8 release,
StartIndexmay be ignored or cause the query to return all results, whereas Windows 8.1 respects this property. - When new items are added to the index between paged requests, items may appear in multiple pages or be skipped.
Specific Questions
- Does the Windows 8 Search API guarantee a stable ordering of results across paged queries when using
QueryOptions.StartIndexandMaxResults? - In Windows 8 (not 8.1), how does the Search API handle
StartIndexvalues that exceed the total number of matching items? - What best‑practice pattern can developers employ to avoid duplicates or missing items when paging through a live index that may change during the session?