Google Drive Api not returning results by descending order of number of occurrences of word

 ̄綄美尐妖づ 提交于 2019-12-18 09:49:28

问题


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

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


回答1:


You can use the orderBy query parameter to order the Documents List Feed by certain criteria:

  • 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.


来源:https://stackoverflow.com/questions/10529474/google-drive-api-not-returning-results-by-descending-order-of-number-of-occurren

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!