DISQUS

Agile SharePoint Development by 21apps: Search Server 2008: Federated sites that do not return XML

  • Anonymous · 1 year ago
    This article helped me greatly during my internship. Thanks!
  • Eugene Rosenfeld · 1 year ago
    Nice article. One question: why are you parsing Google's HTML rather than calling their web services? The web services already return the search results in XML.
    http://code.google.com/apis/soapsearch/reference.html
  • Andrew Woodward · 1 year ago
    Eugene, I agree the code could be refactored to use the API but that was not really the purpose of the article, it was really just demonstrating how you could provide your own proxy federation and from here do what you needed from parsing html to as you point out using providers APIs.


    Andrew
  • Nick · 1 year ago
    Andrew

    I am running MOSS 2007 x64 and I'm using the source files you've provided... I have uploaded the Google.aspx and Google.aspx.cs to 12\Template\layouts\search; and I have imported the FLD, replacing "mssxdemovpc" with the URL of my SharePoint installation. However i am not returning any results when pointing a federated search web part at the Google location, or when browsing to http:\\[my url]\_layouts/search/google.aspx?q=[test search terms].

    Am I missing something?
  • Andrew Woodward · 1 year ago
    Nick, you need to do the last bit and cinfigure security manually.

    NOTE: The FLD file does not store the Credentials in the XML so you will need to manually set this after you import it.
  • Jesper M. Christensen · 11 months ago
    Hello Andrew,

    Thanks for the code - exactly what I was looking for !!

    I have the same problem as Nick though. The Page displays the RSS header but no results in the bottom. I have set up the security - for startes the NTLM App. Pool identity. I am running on a Win2k3 WSS 3 32.bit with the Infrastructure update.

    Any other hints please?
  • Chris · 10 months ago
    I am having the same issue as Jesper. I have set up security but still get no results displayed. I checked the Manage Federated Locations and it says that there have been queries, so I believe it is making the call. I just do not get the results displayed.

    Any other hints yet?
  • Andrew Woodward · 10 months ago
    My initial thoughts on this is that the response from Google has changed so the Regex is no longer working.
  • Tom · 9 months ago
    Same here: No connection to Google available. Starting just the aspx itself creates the following error:

    No connection could be made because the target machine actively refused it 74.125.39.99:80

    Any chance that you will fix this?
    :-O
  • Andrew Woodward · 9 months ago
    Tom,

    Have you tried to access the site http://www.google.com/search?q=test from the SharePoint server? This looks more like you network is locked down to prevent external access or has incorrect routing.
  • Tom · 9 months ago
    Connecting directly with a browser is no problem. Also I am using (for test purposes) the existing live Search Connector, which works too. So I guess there is someting wrong with the connector ...
    Thank you for your response!
  • Allan Pedersen · 8 months ago
    Great article, but unfortunately I haven't been able to get it working. If I test the regex in a standard .net console application it seems that the result page is not properly parsed. I guess that the source HTML for the result page has changed since this article was written. Does anyone have the new regex pattern?
  • David_Effs · 3 months ago
    Thanks for a great article. This regex works:
    Regex searchPattern = new Regex("<li class=g><h3 class=r><a href=\"(?<link>.*?)\"(.*?)>(?<title>.*?)(.*?)</h3><div class=\"s\">(?<desc>.*?)<span class=gl>(.*?)</span>");
  • bradgcoza · 2 months ago
    @ David_Effs : There is something not 100% with that fix, it seems to use 100% of my processor and my sharepoint grinds to a halt ....