Hey Michel,
Thanks for reporting this.
The document search endpoint sorts by created date in ascending order, so the most recently created document will appear at the end of the result array. In your case, you are leaving out filter parameters, so the search will retrieve all documents you have read access to. Which if over 200 documents exist, the request is paged. See more about pagination here. I would expect a freshly created document to be the last item on the last page of a request to the search endpoint. There is also a minor delay in the sync of our document repository and the system that serves this search functionality, so a new document may not show up in the search for a minute or two immediately after creation.
If you want the new document to show up early in the search request, I would suggest setting the createdStartTime parameter to be a recent point in time so you are limiting the range of documents that can be returned to a very small set.
Hope this helps and please let me know if you still have questions regarding this endpoint!
Thank for your reply.
It does not solve the problem. With this body, the newly created document still does not appears
{ "product":["lucidchart","lucidspark","lucidscale"],"createdStartTime ":"2024-05-01T00:00:00Z" }
The “Michel Test” document appears only with this body
{ "product":c"lucidchart","lucidspark","lucidscale"],"createdStartTime ":"2024-05-01T00:00:00Z","keywords":"M" }
That’s unfortunate to hear.
I’ll take this back to the team and see what we can figure out. I’ll update the thread here as we learn more.
Thanks again for reporting this and for your patience as we dig into this.
Hey Michel, just wanted to drop a quick update.
We have been unable to recreate the specific issue you are seeing, but have identified a bug causing indexing to be slower than intended that may be related to your issue. We will reply here when that fix has been deployed and you can try again. In the meantime, I would suggest waiting 20-30 minutes between document creation and using the search endpoint to find that document with a very tight time range from the createdStartTime parameter.
Hope that helps and thank you for your patience!