I have an app that I use to perform content search on two Teams libraries using a flow with the Send an HTTP request to SharePoint action. The first library is the default library that is created with the Team and the second is a library that I created for archived files. The content search on the archive library works as expected and the flow is able to pull in all documents. On the default library, the flow is only pulling in some documents. This is the Uri for the send Send an HTTP request action for each library:
Default library:
/_api/search/query?querytext='SearchString path:https://SharepointLink/teams/TeamName/Shared Documents/*'
Archive library:
/_api/search/query?querytext='SearchString path:https://SharepointLink/teams/TeamName/ArchiveDocuments*'
The SearchString is an input that comes from the app.
Both Uri's are basically the same except for the library name. The default library has 604 files. I've noticed that the flow returns 174 items when the Uri does not have the forward slash at the end of Share Documents. With the forward slash, the flow returns 308 items. I've tried to write the library name as Shared%20Documents in the Uri but that does not make anything better. I have also tried reindexing this library a few times and it does not seem to do anything.
Is there another way write the Uri or something else I can do on SharePoint to make this work they way it is supposed to?