Google Drive Api不会按照单词出现次数的降序返回结果 [英] Google Drive Api not returning results by descending order of number of occurrences of word

查看:148
本文介绍了Google Drive Api不会按照单词出现次数的降序返回结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Google文档列表API在文档中进行搜索。

在谷歌驱动器上搜索ui返回的结果中包含大量出现的文字。但是使用api会首先返回上次上传日期的结果。
这是我使用的网址 https:/ /docs.google.com/feeds/default/private/full?q=search+term



我也尝试过使用 https://docs.google.com/feeds/default/private/full? q = search + term& desc = true ,但是这给出了与我们早先获得的结果相同的结果,即,首先上次上传日期。
有人可以指导我添加哪些附加参数到url中

解决方案

您可以使用 orderBy 查询参数按特定条件排列文档列表供稿:


  • <$ c $

  • 上次访问的:默认值,按上次修改日期排序。按上次访问日期排序。

  • title :按标题排序(这是您要查找的内容。 b $ b
  • 已加星标:通过其已加星标属性对文档进行排序。

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

解决方案

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.

这篇关于Google Drive Api不会按照单词出现次数的降序返回结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆