【问题标题】:How to make the book search faster using amazon api ? What will be the best response group for book search using amazon api?如何使用 amazon api 使图书搜索更快?使用 amazon api 进行图书搜索的最佳响应组是什么?
【发布时间】:2013-03-26 16:04:21
【问题描述】:

我只需要图书图片、标题、作者、isbn、isbn13

我正在使用

 //ItemSearch  where the request is stored as a dictionary.
            var searchItem = new Dictionary<string, string>();
            searchItem["Service"] = "AWSECommerceService";
            searchItem["Version"] = AwsVersion;
            searchItem["Operation"] = "ItemSearch";
            searchItem["ResponseGroup"] = "ItemAttributes,Images";
            searchItem["AssociateTag"] = "Books";
            searchItem["SearchIndex"] = "Books";
            searchItem["Condition"] = "All";
            searchItem["ItemPage"] = itemPage;
            searchItem["Keywords"] = searchText;

            string searchDetailsRequestUrl = detailSearchSingedRequest.GetCompleteUrl(searchItem);

我得到了响应 xml,但是搜索太慢了,因为我得到了很大的 xml 作为响应。那么我应该如何获得小的 xml 作为响应,以使用所有必需的信息(即书籍图片、标题、作者、isbn、isbn13)更快地进行搜索?

我已尝试将“ResponseGroup”=“Medium”。但我得到的 xml 响应比“ResponeGroup”="ItemAttributes,Images" 大。

【问题讨论】:

  • 您的商品搜索速度有多慢?我不相信您有太多选择,因为响应组是由亚马逊预先定义的并且非常大..docs.amazonwebservices.com/AWSECommerceService/latest/DG/…
  • itemsearch 一般需要 4-6 秒。我需要减少这个时间。有没有其他方法可以优化搜索?

标签: amazon-web-services amazon


【解决方案1】:

仅将ResponseGroup 指定为您要检索的某些项目将减少您的页面负载。

【讨论】:

    猜你喜欢
    • 2011-08-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-05-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多