Forum Discussion

DolphInApiUser's avatar
DolphInApiUser
Explorer | Level 3
8 years ago

v2 Search API results delayed

After uploading a file into dropbox, it looks like the v2 search API has a noticeable delay before the file will appear. I don't recall this issue with the v1 API, but its quite apparent now.

 

Repro steps:

1. Drag and drop a file into dropbox on Mac OSX and see checkbox indicating upload is completed.

  For my tests I'm adding a .jpg file into /test/

2. Verify file appears in web interface for DropBox

3. Execute curl request as per dropbox api

 

curl -X POST https://api.dropboxapi.com/2/files/search \
--header "Authorization: Bearer [TOKEN HERE] " \
--header "Content-Type: application/json" \
--data "{\"path\": \"/test/\",\"query\": \"jpeg\",\"start\": 0,\"max_results\": 100,\"mode\": \"filename\"}"

 

Notice that search returns 0 results. After a period of time, it will then return the file uploaded in step 1.

 

8 Replies

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    8 years ago

    Some delay is expected when using the search API endpoint, for both API v1 and API v2, per the documentation: /1/search and /2/files/search.

     

    The amount of delay depends on a number of different factors though, and can vary from account to account, and over time. That being the case, you will see varying amounts of delay like this. 

     

    (For reference, if you know the file or folder path, it's always to query directly, e.g., using /2/files/get_metadata or /2/files/list_folder[/continue] as those aren't subject to the delay.)

  • jianwen's avatar
    jianwen
    Explorer | Level 3
    8 years ago

    I encountered the same issue,In my scenario,the searched folder is created about 2 days ago.the latency is not acceptable.any suggestion for the latency issue? Greg-DB

     

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    8 years ago

    jianwen Are you still seeing this issue? We did fix a general issue yesterday that could have resulted in missing search results.

  • jianwen's avatar
    jianwen
    Explorer | Level 3
    8 years ago

    It seems work well for now.In recent days,the search api work well in my application. thanks Greg-DB

    by the way,why i did not receive the email notification when i got reply or mentions in threads?

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    8 years ago

    jianwen Thanks for following up. I'm glad to hear that search is working properly for you again.

     

    I believe you should automatically get emailed when there's a new reply on a thread you're following, or when you're mentioned. I can't offer support for the forum itself, but I recommend making you're following any threads you're interested in (use the "Follow" button on the right-hand side) and check your email account's spam folder to see if the emails are getting filtered.

  • jianwen's avatar
    jianwen
    Explorer | Level 3
    8 years ago

    Greg-DB from today,search results not working.as the before,created more than days ago folder can not be searched.

    I do not know what happend.thanks

  • jianwen's avatar
    jianwen
    Explorer | Level 3
    8 years ago
    I update the folder (create new folder) to trigger the index update,then search results return correct.
    I do not have details now,i will create ticket when the search results return incorrect again.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.

The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!