locked
Combining multiple sourceTypes in a searchRequest RRS feed

  • Question

  • Hi team,

    I was playing around with the new API and created an application that combined Web, Spell, Phonebook, Image & RelatedSearch source types into one search request.

    When i run my searches, I get all the sourcetypes (except Spell) filled when the search is 'BMW' but nothing is returned with the word 'green'.

    Can all these sourcetypes be intermixed into one SearchRequest or should I separate some of them. (e.g have a different request for the images or phonebook). As far as I can see, it shouldn't matter because the searchResponse just fills the response objects that it finds results for so I can iterate thru them.

    Now, I'm a newb and need to understand concepts. I'm pretty much just copying and pasting stuff and haven't deeply thought about what I'm doing. (I'm 99% sure there is some logic error in my app)

    If that didn't make sense.. never mind me Smile

    AND PLEASE post a code sample of using all the source types in one application. It would be much appreciated by me.


    Monday, November 17, 2008 5:37 PM

Answers

  • The xRank and Movie Showtimes type is not available for public consumption yet. They are two of the types available by invite only in the beta.

     

    HTH

     

    --Alessandro

     

     

    Wednesday, November 19, 2008 4:52 PM

All replies

  • There is a multiple sourcetype code sample in the SDK has at http://msdn.microsoft.com/en-us/library/dd250902.aspx

    See if it helps you. It only has two source types, but the generalization to n should be straightforward.

    We intentionally avoided very complex samples because we preferred to keep the code snippets very essential and very "cut&paste-ready". We may add one if there is enough demand and our choice ends up proven wrong.

     

    Regarding your app's problem. it's hard to tell what is going wrong without seeing the code or the request you send (depending on the interface you are using). If you don't mind pasting the relevant part we can help you

     

    HTH

     

    --Alessandro

     

     

    Tuesday, November 18, 2008 8:36 AM
  • Hi AlessC,

    Thanks for responding.

    I did some review of my code (simple code that it is) and fiddled with a few things.. namely I added a check to see if the obect wasn't null before iterating it..  like this:

                if (mySearchReponse.RelatedSearch != null)
                {
                    foreach (RelatedSearchResult result in mySearchReponse.RelatedSearch.Results)
                    {
                  // iterate and populate my object
     
                    }

                }


    There's no If statement in the code samples and tripped me up a little bit. I'm sure the veteran coders are used to doing this by now..lol

    Is that a good practice ? or is there a better way ?

    Thank you.

    P.S. Are the Xrank and Movie sourceTypes working yet.
    I haven't tried them yet.
    I am exploring the Live Search 2.0 api simply to tap into the celebrity website genre and make good use out of it, hopefully utilizing silverlight. I am currently checking out the tafiti tree. I would love to make a similar app based on celebrities.

    Please tell me that the Xrank api is online because I don't want to jump on the google trends bandwagon if I don't have to.

    Thank you.

    Tuesday, November 18, 2008 7:56 PM
  • The xRank and Movie Showtimes type is not available for public consumption yet. They are two of the types available by invite only in the beta.

     

    HTH

     

    --Alessandro

     

     

    Wednesday, November 19, 2008 4:52 PM
  • How might one go about getting an invitation???

    My company would be very interested in using Microsoft Live Search including the Movie Showtimes type as a service for immediate use in a web application.
    Thanks,
    Henry
    Monday, January 12, 2009 8:11 PM
  • You can start by sending an inquiry to api_tou at microsoft dot com

    I have to set your expectations saying that it is not at all a slam dunk for the time being - there are a lot of issues we are still ironing out, in particular related to the legal permissions to redistribute data for any use. There may be non-obvious limitations we have to respect.

    It would help if you can send a very detailed description of what your app would do with the data and who would be the target audience.

     

    HTH

     

    --Alessandro

     

    Monday, January 12, 2009 10:47 PM