Forum Discussion
anonms2200
Jul 18, 2024Copper Contributor
SharePoint Search REST API Parsing Limits
What is the number of documents the API can parse when given a query?
anonms2200
Jul 18, 2024Copper Contributor
To return these 5000 items, do you know how many documents it can search through before it times out or locates these 5000 items
Jul 18, 2024
Think you are misinterpreting or you need to explain in more detail what you want to do!
So you Send a Rest Request to SharePoint with your Query, You will get a result up to 5000 items in a JSON. This JSON contain information such as name, location etc etc but not content etc.
Check this link to get a better understanding!
https://learn.microsoft.com/en-us/sharepoint/dev/general-development/sharepoint-search-rest-api-overview
So you Send a Rest Request to SharePoint with your Query, You will get a result up to 5000 items in a JSON. This JSON contain information such as name, location etc etc but not content etc.
Check this link to get a better understanding!
https://learn.microsoft.com/en-us/sharepoint/dev/general-development/sharepoint-search-rest-api-overview
- anonms2200Jul 18, 2024Copper ContributorSorry for the confusion. I have a rather large SharePoint document library so when I send a rest request to SharePoint with my query, will the API query my entire library or is there a limit?
For instance, let's say my library has 20,000 documents, will the API be able to iterate through all 20,000 documents? Is there a limit that the API can iterate through?- Jul 18, 2024So you will get the first 5000 items using $top=5000, so getting the next 5000 you need to use paginagtion to get 5001 - 10 001 And then handle the next one etc etc.
Check these links!
https://learn.microsoft.com/en-us/sharepoint/dev/general-development/pagination-for-large-result-sets
https://learn.microsoft.com/en-us/sharepoint/dev/sp-add-ins/use-odata-query-operations-in-sharepoint-rest-requests#page-through-returned-items
https://learn.microsoft.com/en-us/sharepoint/dev/general-development/pagination-for-large-result-sets- anonms2200Jul 22, 2024Copper ContributorSorry Nicolas, I think we're still at a disconnect here. I believe you are talking about the pagination results that are being returned when you send your query. I am talking about all the documents that are being searched through whether or not they have the Querytext in them. For instance lets say I have documents A1, A2, A3 in my SharePoint library and I send a rest request with the 'Querytext': 'SharePoint' and only A1 contains this text. Then the API will search through A1, A2, A3 to find and return the document with the 'Querytext' of 'SharePoint'. Now if I increase the number of documents in my library to a million like A1, A2, A3, A4, A5, ..., A10000000, will the API be able to search through the million documents? Additionally let's say that it goes past a million, is there a limit of the documents the API can search through to find documents with the 'Querytext':'SharePoint' in them?