-
Notifications
You must be signed in to change notification settings - Fork 122
Closed
Labels
Description
Description of the Issue
I am having issues with client.search.query not returning the expected results. My query looks like this:
const extension = <EXTENSION>; // string
const filename = <FILENAME>; // string
const query = {
content_types: ['name'],
type: 'file',
file_extensions: extension
};
const results = await client.search.query(`"${filename}"`, query);
Sometimes the results come back empty, even though there are files that exist in my Box account that match the given filename. However, sometimes the results come back partially correct, as in some of the files that match the given filename are returned but others are not. Sometimes all of the correct results are returned. I think it might be something to do with the age of the file, as I can never get the correct results for newly created files. I expect the query to work for files that have been recently created and even immediately after they are created.
Steps to Reproduce
- Upload a file from UI or from SDK
- Soon after file creation, query for the filename with the query used above
- Recently created file is not in the search results
Expected Behavior
Recently created file is in the search results
Error Message, Including Stack Trace
No error messages
Versions Used
Node SDK: ^1.34.3