我想像这样搜索文件,但出现异常。
query = "mimeType ='application/pdf' and properties has { key="+ "'" + agency + "'" +"and value contains"+ "'" + someValue + "'" + " and visibility='PUBLIC'} ";
request = service.files().list().setQ(query);
我们需要按精确值搜索吗?
query = "mimeType ='application/pdf' and properties has { key="+ "'" + agency + "'" +"and value = "+ "'" + someValue + "'" + " and visibility='PUBLIC'} ";
request = service.files().list().setQ(query);
第二个可以用,但是有没有支持通配符的功能?
最佳答案
是的,对于自定义属性,您必须使用精确值进行搜索
properties has { key='additionalID' and value='8e8aceg2af2ge72e78' and visibility='PRIVATE' }
https://developers.google.com/drive/web/search-parameters#properties
关于java - 有没有办法在谷歌驱动器文件的属性中搜索?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29912610/