Foxy ISO SDN 4 LTR
After writing my article on finding you code in BSP applications, I got more and more interested in search engines. I was really glad when the Searching SDN Just Got Better came out. I liked the simultaneous search within all sources very much.
However I felt that something was missing. What if we could launch the SDN search from within Firefox without even going to the SDN search? Firefox has a search box in the upper right hand corner which makes searching very easy. Wouldn’t it be great if we had such a thing for SDN too?
Just at the moment that I wanted to look into it, Hariraj Narasimhamurthi mentioned in this Firefox search plugin for SDN that he had already made a search plug-in. I was thrilled and immediately downloaded it. It works well. The only downside is that it only works for the old forum search and not the new search engine. So Hariraj and I decided to investigate how we could rewrite it for the new engine. It turned out not to be as easy as it looked. The new search URL contained another (encoded) URL within. In itself that wouldn’t have been such a big deal, except for the fact that this second URL also contained the search string. That was a problem since none of the search plug-in ‘standards’ – more on that further on – allow for the concatenation of strings.
So I gave it a try with only the ‘inline’ URL. The backside of this ‘hack’ was that the surrounding layout didn’t come back. I also suspected that, even though I got a result, the result was perhaps not quite as it should be, so I asked Markus Riedinger what his thoughts were on the subject. He confirmed my suspicions with the following remarks:
· The user will not be able to search all the content, since he has no login possibility, which is required in order to search for SAP Notes. Additionally only the public content will be returned. The only exception would be if the user logged on with a certificate from service.sap.com
· The search requests sent from your plug-in are not logged in the statistics.
· Without displaying the framework with it’s Header and Navigation, the search cannot be used as entry to normal SDN navigation
Luckily Markus’ colleague Tim Boettger came to the rescue, since he had already made the Sherlock plug-in which supports the new search engine. That was cool. I decide to revamp it to the Mycroft standard and even rewrite it to comply with the Conquery standard.
So what are all these standards about?
First, there was the Sherlock search plug-in standard, which was developed by Apple. A search plug-in does nothing more than tell your computer what information to send to a search engine and how to retrieve the results. As said, a search plug-in allows you to access a search engine directly from your browser, without having to go to the engine’s page first.
Then there is the Mycroft standard a.k.a Mozilla Search, which is in fact nothing more than an extension of the Sherlock plug-in with a few differences, but it became the standard for the Mozilla/Firefox community. I’ll talk about the Conquery standard later on.
What does such a plug-in look like?
Let’s take the fictive example that is available at the Mycroft site.
First of all you need to define where to search
class="style1">
<!code>
<search
<!code>
You need to say which is the latest version of Netscape that is supported.
class="style1">
<!code>
version=”7.1″
<!code>
Then you give your plug-in a name, which will appear in the search box.
class="style1">
<!code>
name=”My Plug-in”
<!code>
Some description.
class="style1">
<!code>
description=”My Plug-in – My First Search Plug-in”
<!code>
This the actual script which will do the search.
class="style1">
<!code>
action=”http://myplugin.faq/search“
<!code>
The location of the search.
class="style1">
<!code>
searchForm=”http://myplugin.faq/search“
<!code>
You need to do a GET, POST isn’t supported.
class="style1">
<!code>
method=”GET”>
<!code>
You tell the webmaster that you’re using Mycroft.
class="style1">
<!code>
<!code>
And give the actual query string the user typed.
class="style1">
<!code>
<!code>
This section will describe how to interpret the result which the search engine gives back. We don’t use this for SDN plug-in (yet, see the Mozilla search side bar paragraph).
class="style1">
<!code>
<!code>
The plug-in update info will make sure that the user will have the latest version of it.
class="style1">
<!code>
<browser
update=http://mycroft.mozdev.org/plugins/myplugin.src
updateIcon=http://mycroft.mozdev.org/plugins/myplugin.png
updateCheckDays=”3″
<!code>
That’s it. Not rocket science at all I hear you say. That’s true, but the SDN search isn’t as straight forward/simple as Google for example. The order in which the parameters are given is very important due to the inline URL.
As I said, I revamped Tim’s Sherlock plug-in to the Mycroft standard. But I wasn’t happy with the result though. There was still a missing link. The query string wouldn’t reappear in the search box of the SDN search page. But when I gave it as parameter, it didn’t work at all anymore. Even the obligatory sourceid didn’t suit the SDN search very well. After a while I decided to adopt the Conquery standard.
Conquery has many advantages: it is context sensitive (select a string and click the right mouse button and do a search on it) and it supports regular expressions, special variables, multiple values for one input field via drop down and HTTP POST. The one disadvantage is that it’s not standard within Firefox, which means that you need to install it as an extension. But that’s not too dramatic though so I was quite enthusiastic when I started looking. My enthusiasm began to ebb away though as it got later and later in the evening. The problem is that Conquery URL encodes everything. This means that the already URL encoded inline URL became double encoded, which gave funny results.
So late at night I gave up with no Conquery result and a not 100% satisfactory Mycroft result. After a short sleep I found a solution for the latter while taking a bath. I hadn’t time for shouting ‘eureka’ though since I had to feed my kids and prepare and take them to school and kindergarten.
The solution was relatively straight forward and simple. As I said, the order of parameters is very important and I was focused too much on the SDN search URL and what the Mycroft standard said, without trying to set my own order of input parameters. The result can be found at SDN . Check the MIE ISO SDN 4 LTR 2 web log if you aren’t using Firefox.</p>
as well as Hariraj, Markus and Tim. Excellent work.
I am very happy to see the SDN community working together to solve problems. What can we tackle next?
Thanks a million, Mark.
This is really good.
regards,
Joseph
SDN looks and works better on Firefox anyway.
I'll forward this to our whole project team ;-))
This feature added to [url=Easily access SAP notes from Firefox]the direct access to notes[/url] make firefox a must for any SAP technical consultant !
Btw you also make me discover the new search 😉
Thx Eddy.
SapNotePrint
SapNoteView
SapNoteSearch
I included sdnsearch on my site (autoinstaller)
http://www.woppy.net/sap/
Greetings
Rolf van Etten
I updated sdnsearch plugin today so new search is supported. Find it here: https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/etc/sdnsystemdocs/sdnsearch.zip
Thanks to David Pepperell for making me aware.
Tim