Google Drive Api 未按单词出现次数的降序返回结果 [英] Google Drive Api not returning results by descending order of number of occurrences of word
问题描述
我正在使用 Google Documents List API 在文档中进行搜索.
在 google drive ui 上搜索会首先返回出现次数最多的单词的结果.但是使用 api 它首先返回最后上传日期的结果.这是我使用的 URL https://docs.google.com/feeds/default/private/full?q=search+term
I am using Google Documents List API for searching within documents.
Searching on the google drive ui returns results with most number of occurences of words first. But with api it returns the results with last uploaded date first.
This is the URL which i am using https://docs.google.com/feeds/default/private/full?q=search+term
我也试过 https://docs.google.com/feeds/default/private/full?q=search+term&desc=true 但这给出了与我们之前得到的结果相同的结果,即最后上传日期.有人可以指导我应该向网址添加哪些附加参数
I also tried with https://docs.google.com/feeds/default/private/full?q=search+term&desc=true but this gave the same results that we were getting earlier i.e. by last uploaded date first. Can someone guide me with what additional parameters i should be adding to the url
推荐答案
您可以使用 orderBy
查询参数按特定条件对 Documents List Feed 进行排序:
You can use the orderBy
query parameter to order the Documents List Feed by certain criteria:
last-modified
:默认值,按最后修改日期排序.last-accessed
:按最后访问日期排序.title
:按标题排序(这是您要查找的内容.starred
:按文档的starred"属性对文档进行排序.
last-modified
: Default value, sort by last modified date.last-accessed
: sort by last accessed date.title
: sort by title (this is what you're looking for.starred
: sort documents by their "starred" attribute.
这篇关于Google Drive Api 未按单词出现次数的降序返回结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!