next up previous
Next: 3.1 Transport Up: Quick User's Guide Previous: 2 Installation

3 Config file

There are some different files in conf/, but the only one to set up a Searchy agent, and the only one that you must modify, is agent.xml. For advanced users it may also be necessity to modify log4j.properties, this file is used to config the logging system, but it comes initially with a configuration valid for any typical situation. If you do not know the goal of the rest of files, you do not need modify them.

The main config file, and the one that certainly you will need to modify, is AGENT.XML. This is an XML file that describes the behaviour of the agent, it comes with lots of comments, so reading the original AGENT.XML should be enough to understand it, however, we will explain it with some detail here using an examples. The following config file is the simplest agent, an agent with only one Google provider.

<?xml version="1.0" ?>

<agent>

  <transport name="Example agent" target="Google provider">

     <port>33333</port>

     <max-connections>10</max-connections>

     <log-config>../conf/log4jdebug.properties</log-config>

     <timeout>100000</timeout>

  </transport>

  <provider name="Google provider" type="Google" map="Google map">

    <key>YouGoogleKeyGoesHere</key>

  </provider>

  <map name="Google map" type="filter">

    <title filter="response">%title%</title>

    <subject filter="response">%summary%</subject>

    <identifier filter="response">%url%</identifier>

    <type filter="response">%hostName%</type>

    <description filter="response">%snippet%</description>

    <title filter="query">%query%</title>

    <creator filter="query">%query%</creator>

    <subject filter="query">%query%</subject>

    <description filter="query">%query%</description>

    <coverage filter="query">%query%</coverage>

    <type filter="query">%query%</type>

    <identifier filter="query">%query%</identifier>

    <source filter="query">%query%</source>

    <rights filter="query">%query%</rights>

    <publisher filter="query">%query%</publisher>

    <date filter="query">%query%</date>

    <format filter="query">%query%</format>

    <language filter="query">%query%</language>

    <contributor filter="query">%query%</contributor>

    <relation filter="query">%query%</relation>

  </map>

</agent> 

The file has three sections whose meaning is clearly delimited.

Transport
It defines several general parameters of the agent, like its name, the port where it listens, the maximun number of connections or the log config file. The providers that the agent use is defined here with the attribute target, at least you must specify one provider, if you put more than one they must be split by a comma.
Provider
Each type of provider have its own parameters, but there are three parameters equal for all type of providers. They are the attributes name, type and map. Name defines the string that identify the provider, and it is only used to locate the provider within the config file; the type sets the type of the provider, actually it may be RDF, LDAP, SQL, Google or custom and map defines which map this provider will use.
Map
The map is likely the most difficult issue in the config file, it is responsible to set the rules to translate the information contained in the information support into metainformation.
The above example shows an agent called ``Example agent'', this name will identify the agent in the Searchy system, so it should be a representative name. It only has a provider, ``Google provider'', and this provider uses the map ``Google map''. Let's see each section in more detail.



Subsections
next up previous
Next: 3.1 Transport Up: Quick User's Guide Previous: 2 Installation
2004-05-20