Friday, May 04, 2007
#
If you have ever submitted a global search, you have most certainly been served a few advertisements as well.
In most cases these ads provide as a supplement to regular rankings for niche businesses. For more competetive markets, these ads are the only certain way of making it to the frontpage of a global result-page.
Naturally, displaying an ad on a local website can also be an advantage in order to gain the 'correct' attention of the viewer.
If your visitor comes looking for apples, dont serve him bananas. In fact you should serve him apples, and then throw a good offer (or applepie recipe) in on top!
With MondoSearch the ability to display certain extras, based on the submitted search, is called a
SearchHeader.
The standard setup of this feature, will display the SearchHeader on top of the result list. However, this is just the out-of-the-box scenario.
In general you can choose to put the SearchHeader anywhere you like.
Actually you can see how a different placement of the SearchHeader works for the Vatican in my previous post. Notice the picture of Pope Benedict XVI triggered by a search for 'pope'
And that is exactly my point with this posting, to prove that despite the name 'SearchHeader', this product feature acts as a trigger. And this trigger can be used for almost anything.
I have enclosed a few live examples of the versatility of SearchHeaders.
- Standard setup. Displaying a bit of HTML/CSS styled text on top of the search results
- Speciel Effects setup. By Utilizing a bit of javascript you can use the trigger to popup a window with important information.
- Full Monty setup. One of the oldest tricks in the CSS book is to 'hide' content with the display:none syntax. In not so many words you can hide everything but the searchheader on the result page.
(Just remember to include an option to make the result list visible again.)
But these POC's doesnt limit the usage of this trigger. Another example is Mr. UseIT's signup to his alertbox newsletter whenever somebody searches for '
alertbox'.
Technically what happens is, that you can setup a word or phrase for MondoSearch to react on. This word or phrase is tied to a piece of client-side code you provide (HTML / CSS / Javascript or just plain text).
Whenever a user then searches for one of these terms, the code you provided will be rendered in the selected SearchHeader spot.
A simple feature, with limitless options.
The trick is to give your SearchHeader a layout that is subtle enough to be noticed, but not so extravagant that you lead your visitor on. Remember that your visitor searched for actual content - and not to be entertained by your Rube Goldberg-like SearchHeader.
I recommend starting of light with simple one-liners and small icons or images to emphasize and link to your important content. Then later you can start integrating campaign sign-ups or the like on top of the regular search results.
And this concludes my SearchHeader lesson for today.
Tuesday, April 17, 2007
#
Welcome to my first real post as a Mondosoft blogger.
Today I am going to share some code I initially made to follow up on a feature request from the Vatican. But first a little backstory, so bear with me.
Backstory:
At some point back in time, MondoSearch became .Net compatible meaning that search and result pages was now available as both standard webform .aspx pages - and through a web service interface. It's actually so long ago that I honestly do not remember.
Since then, I have one more than one occasion been building customized solutions for various customers. Although these were often merely of a layout nature, some have required a bit of creativity and development. Different customers have different needs, I guess this is true for most business. Fortunately, the .Net interface provided with MondoSearch allows for almost anything you can think of. And after MQL was introduced, it has just become easier to tweak the product to fit special needs.
Getting back to the subject I'd like to share the fact that many companies check wellknown global search engines, and then ask if we can do the same (or provide similar features). This is only natural, since people can relate to something they use on a daily basis when talking about search. Of course there are many differences between global search and what we do - but thats a whole other story.
So when we we're asked if that handy way of doing boolean search by utilizing the '+' and '-' prefix was possible, I
had to dig into the abilities of the SearchProvider. To make something like this work I needed a way to "keep out" some parts of a query while acting on the rest.
The following settings / searchoptions came in handy:
- Option to switch between AND / OR search
- Ability to exclude words from the query
These two settings plus some C# code was all it took.
First off a function to switch between doing 'AND' or 'OR' searches had to be made. Since an 'OR' search should always be standard (or in most cases is) the function should only switch to 'AND' in case somebody was searching for the existence of two or more given words where at least one of these had to be present. This was simply achieved by looking for the '+' prefix.
In case one or more words had the '-' prefix, they should be added to the SearchExcludeQuery parameter. A simple loop through the entered search query took care of that.
Finally the actual search query had to be cleaned of any of the above commands before proceeding with the request.
3 functions and 1 prepared SearchControl resulted in this code (.txt file).
The code example should speak for itself. But feel free to visit the Vatican and test it yourself.
An example from the top of my head would be to do a standard search for "
pope benedict" (without the quotes) which should yield over 6000 results (all documents containing either "pope" or "benedict").
Then try doing a '-' prefix search for "pope -benedict" (without the quotes) which should yield about 4600 results (since we are getting all documents written by a Pope who did not go by the name Benedict).
Finally try something like searching for "pope +ratzinger -benedict" (without the quotes) which yields about 90 results (here we get results about Ratzinger before he was named Benedict and entitled as Pope).
All thanks to impleting prefixed search queries or +/- booleans as I often call it.
Thursday, January 25, 2007
#
Welcome to my blog about using, and getting the most of MondoSearch.
I will also be writing about tips and tricks to implement on top of MondoSearch to make it even more user-friendly.