Google Drive API: full text search doesn't work when using 'in parents' option

29 Views Asked by At

If I make a query with full text search that searches inside Google Docs file and add "in parents" option.

Such as

Query:

fullText contains 'часом знемагаю' and trashed = false and mimeType = 'application/vnd.google-apps.document' and '1234567' in parents

Result:

{
    "files": []
}

Result is empty files list. But if remove "in parents" part and make another search I get this file. And that file has an ID in parents field.

Query:

fullText contains 'часом знемагаю' and trashed = false and mimeType = 'application/vnd.google-apps.document'

Result:

{
    "files": [
        {
            "parents": [
                 "1234567"
            ]
        }
    ]
}

Interesting part is that it returns file if full text search query contains words from file's name.

I'm pretty sure that query worked some time ago as expected.

UPD: Query also works if I duplicate "in parents" part.

fullText contains 'часом знемагаю' and trashed = false and mimeType = 'application/vnd.google-apps.document' and ('1234567' in parents or '1234567' in parents)
0

There are 0 best solutions below