locked
no datetime in search results RRS feed

  • Question

  • Hi, I inherited some code, and I really dont get completly how it works, it seems to use this class "MSNSearchService.cs" which says its generated.

    Anyway, the code has been running in production for a while and it works fine but the datetime does not come back with any results. I guess I can understand this for regular results, but it also doesnt come back with News results.

    What can I do to troubleshoot this?


    thanks!
    Friday, December 5, 2008 2:18 AM

Answers

  • From the scant data it would seem that you are using API version 1.1 (currently deprecated).

     

    My wild guess would be that your code is not setting the ResultField flags correctly.

    In spite of the name ResultFieldMask.All does not have all the fields, only the most default ones (title, description, url), and DateTime is not one of them. It is one of the rough edges of the legacy API.

     

    Be sure that in the SourceRequest object for web (or news) you set it properly, for example to have the default fields plus

     

    Code Snippet

    newsSource.ResultFields = ResultFieldMask.Source Or ResultFieldMask.DateTime Or ResultFieldMask.All

     

    [Example in VB.net for a change]

     

    If this is not the problem, it is hard to diagnose it without seeing the code.

     

    HTH

     

    --Alessandro

    Friday, December 5, 2008 4:30 AM

All replies

  • From the scant data it would seem that you are using API version 1.1 (currently deprecated).

     

    My wild guess would be that your code is not setting the ResultField flags correctly.

    In spite of the name ResultFieldMask.All does not have all the fields, only the most default ones (title, description, url), and DateTime is not one of them. It is one of the rough edges of the legacy API.

     

    Be sure that in the SourceRequest object for web (or news) you set it properly, for example to have the default fields plus

     

    Code Snippet

    newsSource.ResultFields = ResultFieldMask.Source Or ResultFieldMask.DateTime Or ResultFieldMask.All

     

    [Example in VB.net for a change]

     

    If this is not the problem, it is hard to diagnose it without seeing the code.

     

    HTH

     

    --Alessandro

    Friday, December 5, 2008 4:30 AM
  • Thanks that was it, I just added DateTime to my OR mask clause, it didnt have all but just title, description and url.

    thanks again!
    Joel
    Friday, December 5, 2008 1:15 PM