0

字符串查询=“123”;

        // Create a Bing container.
        string rootUrl = "https://api.datamarket.azure.com/Bing/Search";
        var bingContainer = new Bing.BingSearchContainer(new Uri(rootUrl));

        // The market to use.
        string market = "ar-XA";

        // Get news for science and technology.
        string newsCat = "rt_ScienceAndTechnology";

bingContainer.Credentials = new NetworkCredential("...", "...");

// 构建查询,限制为 10 个结果。var newsQuery = bingContainer.News(query, null, market, null, null, null, null, newsCat, null); newsQuery = newsQuery.AddQueryOption("$top", 10);

         //Run the query and display the results.
        var newsResults = newsQuery.Execute();

        foreach (var result in newsResults)
        {
            Console.WriteLine("{0}-{1}\n\t{2}",
             result.Source, result.Title, result.Description);
        }

为什么这对日本等其他语言可以工作,只对阿拉伯语不工作!必应搜索API没有在阿拉伯语做任何测试吗?

4

1 回答 1

0

Bing 可以返回阿拉伯语的结果。您提供的特定查询词恰好不在阿拉伯语结果的 Bing 索引中。如果您在索引中搜索了诸如“清真寺”之类的术语,则会返回结果。请参阅下面的查询

https://api.datamarket.azure.com/Bing/Search/v1/Web?Query=%27mosque%27&Market=%27ar-XA%27

兵足

于 2013-03-16T23:05:24.680 回答