It's amazing how coding one cool hack can make your day...
So we've been working long and hard to implement a Google Search device that interacts with a number of Notes/Domino applications. Not to go into much detail, but suffice it to say there have been a number of "challenges", mostly on the Google side. But tomorrow we go live, and it looks to be something that will greatly improve the search capabilities on these particular applications.
One issue that's been outstanding is the "what if the Google box goes down?" We have redundancy, but you can always find another level of failure to take out your backup. The way I coded the JavaScript calls to the search appliance meant that instead of calling "doSearch", I called "doGoogleSearch". I left the old search routines running against the Domino search engine out there "just in case". If things were to go drastically bad, I could, in a pinch, go out, change about five areas in the app, and have them back to the Domino search engine to give us time to resolve the Google issue. But what if I wasn't around? What if I got hit by the proverbial beer truck?
Thus, "the hack".
I added a form called Search Configuration with a single field... value of "Google" or "Notes". Each web form has a computed for display field that does a @DbColumn lookup on the view that contains that document. Each JavaScript call to the search code now looks at the value of that field to determine if it should call the doGoogleSearch or the doSearch routine. The default in case of lookup failure is Google, but we can switch back to the Domino search engine in the time it takes to modify that document and select a radio button option.
I realize that's Notes Programming 101 stuff, but we've had so many other things going on that I hadn't really had the chance to eliminate myself from the process of switchover. No longer will there be plans to get ETA of resolution, time limits on how long I have to get the modifications into production to point to Domino, then the process to get stuff back to Google, etc. Just "let's switch", and BAM! It's there...
It's so nice to know that we always have the fallback position available in an instant, and that my presence is not required to make it all work. Plus it's a huge security blanket to the business side knowing they won't have any search outages where *no* options are available.
Couple that with finally getting a long-running private view/folder issue fixed for someone today, and I'm feeling pretty good about things (nerd score notwithstanding...)


