Keep Sharepoint ranked results steady in seach with Graph API

Tim 151 Reputation points
2022-11-07T13:42:15.427+00:00

Im doing a search through the MS Graph API by using KQL:

   {  
      "requests": [  
        {  
          "entityTypes": [  
            "listItem"  
          ],  
          "query": {  
            "queryString": "Title:TitleSearch isDocument:True filetype:pdf"  
          },  
          "from": 0,  
          "size": 1000  
      ]  
}  

Which give me more than 1000 results, meaning that in the result moreResultsAvailable": true is included. Now for the next one I try the same query with body:

   {  
      "requests": [  
        {  
          "entityTypes": [  
            "listItem"  
          ],  
          "query": {  
            "queryString": "Title:TitleSearch isDocument:True filetype:pdf"  
          },  
          "from": 1000,  
          "size": 1000  
      ]  
}  

as to get the following 1000 results. However, the problem I run into is that in the first result, the first X hits are basically the same. The further out I go, the results seem to be quasi-randomly returned based on hit. Meaning that a document that might have rank 1000 the first time, might get rank 975 the next. However, i need to find all unique documents in this way.

Is it able to disable this randomness in the query/search results? Otherwise I might miss documents, or might have double documents (for instance when a document has rank 999 the first time, and 1010 the second, in which case the two queries will both include them.

If this is not possible I have a big problem

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
7,076 questions
Microsoft Graph Search API
Microsoft Graph Search API
A Microsoft API that searches for information in email messages, returns messages ranked by relevance, and renders a dedicated search experience.
176 questions
SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
1,977 questions
{count} votes