Autonomy Search Developer Starter

January 17th, 2008 by Jonathan Leave a reply »

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 isimage 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.

Advertisement

5 comments

  1. Michael says:

    Hi – I am pretty new to Autonomy. I believe it operates primarily on web services interfaces – is this correct? Or does it just format everything in XML? If it does use web svcs, where is the default WSDL (or equivalent) file located? Thanks in advance!

  2. Jonathan says:

    Michael, it doesn’t use web services. There’s no WSDL that I know of–it simply formats things in a simple XML format in response to HTTP GETs, with a collection of parameters to define the query and control the results. Hope that helps.

  3. Corical says:

    Hi, have you played around with the training before, primarily Agents ?

    I tried to use some of the binary search options specified for Query (action) in the training, but to no avail. Also then NEAR, OR, NOT keywords.

  4. Jonathan says:

    I have played around with training, and found that the only way to get the Boolean Agents to work was to also provide them with at least one training operator (I injected a field into each inbound document with a fixed value, something like “TOBETRAINED”), then set that word as the training term. Unless you do that, the boolean operations don’t work.

  5. Max says:

    Could you please share some sample code as to how to execute a search using java program or any other.

Leave a Reply