Results > Customize Results > Generate Dynamic Clusters > Create a Cluster Map

Create a Cluster Map
You can use the ClusterMapFromResults action to create a map of the clusters you generate from your query.
You provide XML-formatted cluster information as the importXML parameter to ClusterMapFromResults, and it returns a 2D cluster map as binary image data. The file is by default in JPEG format, but (as in the case of the ClusterServe2DMap action) you can specify another format by setting the PictureFormat configuration parameter in the [Cluster] section of the IDOL server configuration file.
ClusterMapFromResults also creates and stores a new set of cluster results that includes the map coordinates of the clusters. If your application uses these cluster results to support mouse-over effects when displaying the cluster map, you can retrieve the results using the ClusterResults action. In this case, use the TargetJobName from the ClusterMapFromResults action as the SourceJobName in the ClusterResults action.
When you send data to ClusterMapFromResults using the ImportXML parameter, you must use the following format:
<?xml version='1.0' encoding='UTF-8' ?>
<autn:clusters xmlns:autn='http://schemas.autonomy.com/aci/'>
    <autn:numclusters>5</autn:numclusters>
    <autn:cluster>
        <autn:title>MyClusterTitle</autn:title>
        <autn:score>5.63</autn:score>
        <autn:term>CAT~[85]</autn:term>
        <autn:term>DOG~[76]</autn:term>
        <autn:term>RABBIT~[65]</autn:term>
        <autn:term>HAMST~[64]</autn:term>
        <!-- more terms -->
        <autn:docs>
            <autn:numdocs>3</autn:numdocs>
            <autn:doc>
                <autn:title>MyDocTitle</autn:title>
                <autn:ref>http://foo.com</autn:ref>
                <autn:score>5</autn:score>
            <autn:doc>
        <!-- more docs-->
        </autn:docs>
    </autn:cluster>
    <!-- more clusters-->
</autn:clusters>
This XML format is similar to the format of the XML results of a Query action. If you pass this data on the command line in the ImportXML parameter, you must first percent-encode it.
 
NOTE As an alternative to providing XML data to ClusterMapFromResults, you can provide it with a job name from a previous ClusterCluster action.
Related Topics 
*