{"action":"created","issue":{"url":"https://api.github.com/repos/box/box-python-sdk/issues/266","repository_url":"https://api.github.com/repos/box/box-python-sdk","labels_url":"https://api.github.com/repos/box/box-python-sdk/issues/266/labels{/name}","comments_url":"https://api.github.com/repos/box/box-python-sdk/issues/266/comments","events_url":"https://api.github.com/repos/box/box-python-sdk/issues/266/events","html_url":"https://github.com/box/box-python-sdk/issues/266","id":310149774,"node_id":"MDU6SXNzdWUzMTAxNDk3NzQ=","number":266,"title":"Search query failures","user":{"login":"sci-tab","id":11506578,"node_id":"MDQ6VXNlcjExNTA2NTc4","avatar_url":"https://avatars2.githubusercontent.com/u/11506578?v=4","gravatar_id":"","url":"https://api.github.com/users/sci-tab","html_url":"https://github.com/sci-tab","followers_url":"https://api.github.com/users/sci-tab/followers","following_url":"https://api.github.com/users/sci-tab/following{/other_user}","gists_url":"https://api.github.com/users/sci-tab/gists{/gist_id}","starred_url":"https://api.github.com/users/sci-tab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sci-tab/subscriptions","organizations_url":"https://api.github.com/users/sci-tab/orgs","repos_url":"https://api.github.com/users/sci-tab/repos","events_url":"https://api.github.com/users/sci-tab/events{/privacy}","received_events_url":"https://api.github.com/users/sci-tab/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-30T19:33:22Z","updated_at":"2018-08-31T22:29:09Z","closed_at":null,"author_association":"NONE","body":"Use case: I want to query for all files of a certain type in Box.\r\n\r\nIssue: Search returns incorrect results (0) for queries in which the file extension and file name are the same.\r\n\r\nIt will return correct results with just file name. Ex. It can find the desired files when searching the file name `dat`, but you can imagine many other things might contain that in the name (data) and extension is needed.\r\n\r\nI'm able to make the query directly using `https://api.box.com/2.0/search?query=dat&file_extensions=dat` endpoint and using the JS SDK. It fails (returns 0) for python sdk. More documentation for the search endpoint would also be helpful.\r\n\r\nHere is my code:\r\n\r\n```\r\n results = client.search(\r\n            filename,\r\n            file_extensions=extension,\r\n            limit=LIMIT,\r\n            offset=offset,\r\n            ancestor_folders=folder,\r\n            result_type='file')\r\n```\r\n\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/box/box-python-sdk/issues/comments/417805121","html_url":"https://github.com/box/box-python-sdk/issues/266#issuecomment-417805121","issue_url":"https://api.github.com/repos/box/box-python-sdk/issues/266","id":417805121,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNzgwNTEyMQ==","user":{"login":"mattwiller","id":2695901,"node_id":"MDQ6VXNlcjI2OTU5MDE=","avatar_url":"https://avatars1.githubusercontent.com/u/2695901?v=4","gravatar_id":"","url":"https://api.github.com/users/mattwiller","html_url":"https://github.com/mattwiller","followers_url":"https://api.github.com/users/mattwiller/followers","following_url":"https://api.github.com/users/mattwiller/following{/other_user}","gists_url":"https://api.github.com/users/mattwiller/gists{/gist_id}","starred_url":"https://api.github.com/users/mattwiller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattwiller/subscriptions","organizations_url":"https://api.github.com/users/mattwiller/orgs","repos_url":"https://api.github.com/users/mattwiller/repos","events_url":"https://api.github.com/users/mattwiller/events{/privacy}","received_events_url":"https://api.github.com/users/mattwiller/received_events","type":"User","site_admin":false},"created_at":"2018-08-31T22:29:09Z","updated_at":"2018-08-31T22:29:09Z","author_association":"MEMBER","body":"@sci-tab I just tested this in my own account and it seems to be working correctly.  One thing you might want to double-check is the values you're passing for `ancestor_folders` and `file_extensions` should both be `Iterable`.  For example:\r\n\r\n```python\r\nresults = client.search(\r\n            filename,\r\n            file_extensions=['dat'],\r\n            limit=LIMIT,\r\n            offset=offset,\r\n            ancestor_folders=[client.folder(folder_id)],\r\n            result_type='file')\r\n```"}}
{"actor":{"display_login":"mattwiller"}}