So you’ve got an Autonomy IDOL in hand, and you’ve been asked to build a search application around it. Here are some thoughts on getting started.
Let’s assume you’ve got the content in. In a later post I’ll cover some of the fetches/connectors that you have access to, and what you can do with them. For now, let’s start with a simple query. Assume that the IDOL is installed on the server search, on port 9000. Open your browser to:
http://search:9000/action=query&text=*
An installed IDOL listens on many ports: the default port of 9000 is where the IDOL Proxy Service sits and listens. The response for an “action=query” is to return results that match the “text=” query. By default, the response will contain up to 6 records, showing the default fields for each records (usually that includes a small subset of the metadata, and none of the content for each record), and will look something like this:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<autnresponse xmlns:autn="http://schemas.autonomy.com/aci/">
<action>QUERY</action>
<response>SUCCESS</response>
<responsedata>
<autn:numhits>6</autn:numhits>
<autn:hit>
<autn:reference>test_document.doc</autn:reference>
<autn:id>1</autn:id>
<autn:section>0</autn:section>
<autn:weight>96.00</autn:weight>
<autn:database>News</autn:database>
</autn:hit>
...
<responsedata>
</autnresponse>
Lesson #1: All meaningful Autonomy interaction is through URLs, and the response is typically in XML. Some simple C# code to handle the response above would look like:
1: XmlDocument xml = new XmlDocument();
2: xml.Load("http://search:9000/?action=query&text=*");
3:
4: XmlNamespaceManager nsmgr = new XmlNamespaceManager(xml.NameTable);
5: nsmgr.AddNamespace("autn", "http://schemas.autonomy.com/aci/");
6:
7: XmlNode node = xml.SelectSingleNode("/responsedata/autn:hit[1]/autn:reference", nsmgr);
The next step is to figure out how to issue queries that are more meaningful than text=*. For that, we turn to Autonomy’s built-in help page. You access it by–you got it–going to a URL:
http://search:9000/action=help
Lesson #2: Always have the help URL open on a monitor. The HTML help that is displayed is the single best resource for questions; and ironically, it is
not searchable. Non-searchable help? From a search company? Yes. Perhaps that was left intentionally as a challenge to the buyer to set up their first source… In any case, your first friend will be the Query node, where you can find all sorts of helpful information on how to build the specific query you’re looking for. Remember, unless your users are technical, it will most likely be your responsibility to “query cook”, accepting simplified input from your users and creating the complex URL that Autonomy needs.
In future posts, I’ll look at some of the specifics of the query URL, and how to see the impact in the logs.