Microsoft Search Graph API returning missing results when using the 'from' property
Overview
I am facing an issue when using Microsoft Graph Search API (https://graph.microsoft.com/v1.0/search/query) sometimes there are missing results in the page or none at all. The entitytype I'm searching is listItem. This should match SharePoint items, but in reality we are getting missing results.
I'm testing with this basic query ->
Tests
Here are different tests with updated values for the from property in the query's payload.
E.g. From = 0 we have 10 hits as expected.
And showing there are 20,837 results.
Then we test with from = 110 to go up to page 10 ->
And here also showing the 10 results correctly. The result count seems to still make sense, though it changed without changing the query.
Then another example to the next page 11 ->
And suddenly no results. And also total changed by a lot, though still a lot higher than 120 results. Thus suddenly that are 10 missed results. Following that I tried the next few pages, and got 10 results in each page as expected.
This behavior happened on at least 3 different tenants I tested at different pages and seem to varies from day to day. The behavior results in empty pages, and/or missing results in certain pages.
We are trying to follow the documentation as explained here -> https://learn.microsoft.com/en-us/graph/api/resources/searchrequest?view=graph-rest-1.0
Regarding Testing environment:
• Issue found on several different tenants.
• Tested using Microsoft Graph Explorer.
• Tested in different browsers.
Further Tests
I made further tests on another day trying to increase paging sequentially:
So I ran this test as follows: Size is always 10
Note how from with these values: 40,50,60,70,80,110 and 120 all have missing hits.
Then tried with 'from' 110 again after 30 minutes and got 0 hits. Same scenario were 160 had results and same number of results.
I would like to understand why the API is behaving this way and what I can do to get good results.