We recently had a customer ask us if it was possible to integrate Google Search functionality into NetHelp targets. The idea behind it is that you replace NetHelp’s built-in search technology (and search interface) with the search technology and interface of Google.
We knew that we had customers that had successfully accomplished this, but we weren’t sure exactly how they did it. The development team set to the task of figuring it out and found the answer to be surprisingly simple (albeit with a number of important, well-defined steps).
I was then set to the task of figuring out how to do it myself with a NetHelp project on the Doc-To-Help website. The logic there was that, “If Brad can do it, anyone can do it.” I was able to put everything together.
Here’s what I did:
- Built the Pittsburgh250XMLSource sample project (included with Doc-To-Help) as NetHelp.
- Followed the instructions in the documentation for posting a NetHelp project to a web server and posted the sample NetHelp target on the Doc-To-Help website here: http://www.doctohelp.com/nethelpgooglesearch/
- Set up a Google account. I have a personal account, but I wanted to make sure I had one just to manage this project.
- Went to: http://www.google.com/cse/manage/create to create my Custom Search Engine.
- Filled in the required fields: Name, Language, Site to Search,and Editions. I chose the Standard edition, since it’s free, but you can choose the Site Search edition if you feel the added features are worth the added cost (or already have a search licensing agreement in place with Google). I set the Site to Search as http://www.doctohelp.com/nethelpgooglesearch/
- In the Try it Out section, I chose the Shiny theme, then clicked Get the Code.
- I then copied the code and pasted it into the Pittsburgh250XMLSource-search.htm. I included this file in the GoogleSearchFiles.zip file that is attached to this post. For different projects, the file will carry different names, but it will always be located at the root of the NetHelp folder and will always follow the naming convention: -search.htm.
- For Google to index the site, I created a Site Map file for the NetHelp target and placed that file in the NetHelpGoogleSearch directory of the Doc-To-Help site http://www.doctohelp.com/nethelpgooglesearch/. The file (sitemap.xml) is also in GoogleSearchFiles.zip. You can open the file in Notepad and change the URLs in it to your URL. Just open it in Notepad, Select All, Copy, open Word, Paste, then do a global Find and Replace that replaces my URLs with yours. Once the URLs are changed, Select All, Copy back into Notepad, and save the file (make sure you save it as an XML file).
- Google needs to know that the Site Map exists and that you have posting rights to the site where it is hosted. If you go to the Indexing section of the Control Panel and click the “Submit another Sitemap” link, you will be taken to Webmaster Tools, which will guide you through the process of submitting. Basically, you just need to point Google to the Sitemap file, which was located here for me: http://www.doctohelp.com/nethelpgooglesearch/sitemap.xml.
- You may be asked to confirm that you have posting rights to that URL. In order to confirm, you need to upload a simple HTML file that Google provides, then click Verify.
- Back in Indexing in the Control Panel, use the On-demand Indexing feature to get your site indexed faster. Just select your Sitemap from the list and click Index Now.
That’s it. Your NetHelp site should be indexed within 24 hours.
Two things to bear in mind:
- For each release, you will need to re-add the -search.htm file to the NetHelp folder, since Doc-To-Help will re-write that file (and the code from Google) when you Rebuild your Target.
- For each release, you will need to add additional topics that have been created (with complete URL) to the Sitemap file since the last release, then go back to the Control Panel and click Index Now to make sure that everything is in order.
Keep an eye out for the new, improved NetHelp design, slated for the 2011 V2 release due out this summer. We will be posting an update to this post with new instructions. Those instructions will likely include fewer steps and less manual maintenance.
For more on Google Custom Search, start here: http://www.google.com/cse/




[...] [...]
Chet,
We’re adding a new feature in 2012 V1 that will make this process easier for NetHelp 2.0. I’ll have that update posted on or near the release date (1/24/12).
Great, thanks Brad, will look for it then.
Thanks Brad, looks neat. But my helpfile uses NetHelp 2.0 output format. Can you post a procedure for use of Google custom search with the Search tab of NetHelp 2.0 format?
–Chet
That sounds really great. I will test it asap.