Converting from Bing 2.0 API to Azure. Not very pleased with the Azure service. Frequent timeouts. But my problem now is this:
- Silverlight application with search component
- I am using a Composite search and specifying as the first parameter whether it is for 'web' or 'news'
- I was searching for 'seattle,' lower case.
- A web search returned the correct results but a news search returned no results.
- If I changed 'seattle' to 'Seattle,' with uppercase 'S' both searches returned correct results.
- If I changed 'seattle' to 'SEATTLE' all uppercase letters, web search returned the correct result but news search returned no results
My code:
// Form the query with highlighting
var Query = bingContainer.Composite("news", "seattle", "EnableHighlighting", null, null, null, null, null, null, null, null, null, null, null, null)
// Add the page size to get how many results are retrieved
.AddQueryOption("$top", Request.PageSize)
// Add the offset to get the correct page
.AddQueryOption("$skip", Offset);
// Start time for query
StartTime = DateTime.Now;
// Execute the query
Query.BeginExecute(new AsyncCallback(
delegate(IAsyncResult ar)
{
// Get the duration
Duration = DateTime.Now.Subtract(StartTime).TotalMilliseconds;
// Parse the results
var QueryResult = ((DataServiceQuery<Bing.ExpandableSearchResult>)ar.AsyncState);
var Results = QueryResult.EndExecute(ar);
foreach (var result in Results)
{
// Do something with results...
// Will not get here for lowercase 'seattle'
}
}
), Query);
This is not the behavior that occurs from the bing.com search site and I'm wondering why I see it from the Azure API.
Any help, greatly appreciated, and may stave off switching to Google Search API.
Thanks,
Clyde