Answered News Search Affected by Capitalization

  • Saturday, August 18, 2012 12:50 AM
     
      Has Code

    Converting from Bing 2.0 API to Azure. Not very pleased with the Azure service. Frequent timeouts. But my problem now is this:

    1. Silverlight application with search component
    2. I am using a Composite search and specifying as the first parameter whether it is for 'web' or 'news'
    3. I was searching for 'seattle,' lower case.
    4. A web search returned the correct results but a news search returned no results.
    5. If I changed 'seattle' to 'Seattle,' with uppercase 'S' both searches returned correct results.
    6. 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

All Replies

  • Saturday, August 18, 2012 5:06 AM
     
     
    Okay, so I had dinner and came back to this problem and now it works as though it should. No difference between lower and upper case search terms. Of course, I changed nothing. Very screwy...very, very screwy.
  • Saturday, August 18, 2012 9:25 PM
    Owner
     
     Answered

    Hard to say what happened here, since we did not change the service while you had dinner as well.

    One potential answer: If you used "DisableQueryAlterations" flag, then the search result may be affected by spelling.

    Thanks,

    Max