如何在 URL 中为 Google 自定义搜索应用过滤和排序结果?
How can I apply filtering and sorting results in a URL for Google Custom Search?
我正在尝试使用 URL 对结果进行排序和过滤
唯一可行的是在 URL 中编写搜索查询。
这里有一些我正在努力实现但没有成功的例子!
https://www.listoc.com/search/homes.htm?q=homes&sort=date:a:w
https://www.listoc.com/search/homes.htm?q=homes&sort=review-date:r::20091231
如果以前有人这样做过请告诉我!
我在指南中阅读了很多内容:https://developers.google.com/custom-search/docs/structured_search
但我不知道该怎么做。
自定义搜索元素不会解析其所在页面中的 url 参数('q' 除外)
您可以做的是:
- 使用 CSE 控制面板添加显式排序选项:https://support.google.com/customsearch/answer/2549537
- 或者,将 'sort_by' 属性添加到搜索元素对象:https://developers.google.com/custom-search/docs/element#supported_attributes
我正在尝试使用 URL 对结果进行排序和过滤 唯一可行的是在 URL 中编写搜索查询。 这里有一些我正在努力实现但没有成功的例子!
https://www.listoc.com/search/homes.htm?q=homes&sort=date:a:w https://www.listoc.com/search/homes.htm?q=homes&sort=review-date:r::20091231
如果以前有人这样做过请告诉我! 我在指南中阅读了很多内容:https://developers.google.com/custom-search/docs/structured_search 但我不知道该怎么做。
自定义搜索元素不会解析其所在页面中的 url 参数('q' 除外)
您可以做的是:
- 使用 CSE 控制面板添加显式排序选项:https://support.google.com/customsearch/answer/2549537
- 或者,将 'sort_by' 属性添加到搜索元素对象:https://developers.google.com/custom-search/docs/element#supported_attributes