Skip to content

Inconsistent search results #565

@reidbuzby

Description

@reidbuzby

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

  1. Upload a file from UI or from SDK
  2. Soon after file creation, query for the filename with the query used above
  3. 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

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions