我想搜索这样的文件,但我得到例外。
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);
第二个正在运行,但有没有支持通配符的功能?
答案 0 :(得分:4)
是的,对于自定义属性,您必须使用精确值进行搜索
properties has { key='additionalID' and value='8e8aceg2af2ge72e78' and visibility='PRIVATE' }
https://developers.google.com/drive/web/search-parameters#properties
答案 1 :(得分:1)
是的,它在官方文档中(你去年他们无法搜索) https://developers.google.com/drive/web/search-parameters#properties按精确值搜索。