none
Different results on localhost and server.

    Question

  • Hi,

    I am using Bing Search API (Azure Market) to perform search operation in my application.

    I am getting different search results on local host and on my server.

    I have found the issue and that is because of Market property.

    I don't have any Market set on local or server, but on server it is automatically using en-US as value of the market property and showing results from US only.

    On local it works perfectly and shows exact results like bing.com itself.

    I want it to work the same way for server also.

    I have also set DisableLocationDetection in option property but no success.

    Any idea how to turn this auto market off?

    Thanks,



    • Edited by abdul2 Sunday, October 27, 2013 9:33 PM
    Sunday, October 27, 2013 9:32 PM

Answers

All replies

  • Hi abdul2,

    I suggest you read this thread: http://stackoverflow.com/questions/8254608/bing-search-api-with-disablelocationdetection-not-working,

    The DisableLocationDetection option prevents Bing from inferring location from the query itself, News requests can specify LocationOverride parameter to get news from a particular US state. Also, if you're having troubles with automatic market detection (if your server is in another country, for example), you can specify Market parameterto override the market detection.

    Hope it helps


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, October 28, 2013 2:23 AM
    Moderator
  • Hi,

    Thank you your response.

    I don't want to use any market parameter at all, i want to have simple worldwide Bing search.

    Also like i said, i have used DisableLocationDetection  property but it doesn't work and server still detects server location (USA) and uses market 'en-US' by default.


    • Edited by abdul2 Monday, October 28, 2013 11:58 AM
    Monday, October 28, 2013 11:52 AM
  • There's no such "worldwide Bing search". You have to specify a market, or use the default market (auto detect). In addition, DisableLocationDetection was a parameter used by the old Bing SDK. It is not available in the current version. If you don't specify a market, then the market where your server (or client, if you use JavaScript) resides is used.
    Monday, November 04, 2013 3:48 PM