Open topic with navigation

# Query Response

This section describes some of the response tags that a query returns.

For example:

    action=Query&Text=spiders&Combine=Simple&Print=all&MaxResults=2

This query might return the following ACI response:

    <autnresponse xmlns:autn="http://schemas.autonomy.com/aci/">
       <action>QUERY</action>
       <response>SUCCESS</response>
       <responsedata>
          <autn:numhits>2</autn:numhits>
          <autn:hit>
             <autn:reference>430377369900437504</autn:reference>
             <autn:id>128534</autn:id>
             <autn:section>0</autn:section>
             <autn:weight>85.27</autn:weight>
             <autn:links>SPIDER</autn:links>
             <autn:database>Twitter</autn:database>
             <autn:content>
                <DOCUMENT>
                   <DREREFERENCE>430377369900437504</DREREFERENCE>
                   <AUTN_GROUP>Connector</AUTN_GROUP>
                   <AUTN_IDENTIFIER>PGlkIHM9IlRXViIgcj0iNDMw</AUTN_IDENTIFIER>
                   <CREATED_AT>Mon Feb 03 16:28:55 +0000 2014</CREATED_AT>
                   <DOCTRACKINGID>256a3b295232c32c4a3ad4caa5c05d3f</DOCTRACKINGID>
                   <DREDBNAME>Twitter</DREDBNAME>
                   <DRECONTENT>If spiders can sit on the web all day then so can I</DRECONTENT>
                </DOCUMENT>
             </autn:content>
          </autn:hit>
          <autn:hit>
             <autn:reference>430369534923374592</autn:reference>
             <autn:id>22023</autn:id>
             <autn:section>0</autn:section>
             <autn:weight>85.27</autn:weight>
             <autn:links>SPIDER</autn:links>
             <autn:database>Twitter</autn:database>
             <autn:content>
                <DOCUMENT>
                   <DREREFERENCE>430369534923374592</DREREFERENCE>
                   <AUTN_GROUP>Connector</AUTN_GROUP>
                   <AUTN_IDENTIFIER>PGlkIHM9IlRXViIgcj0iNDM</AUTN_IDENTIFIER>
                   <CREATED_AT>Mon Feb 03 15:57:47 +0000 2014</CREATED_AT>
                   <DOCTRACKINGID>2a6e7bbc51001b815efa9b30acf6704e</DOCTRACKINGID>
                   <DREDBNAME>Twitter</DREDBNAME>
                   <DRECONTENT>eek! spiders!</DRECONTENT>
                </DOCUMENT>
             </autn:content>
          </autn:hit>
       </responsedata>
    </autnresponse>

For a query action, the `<responsedata>` element contains the `<autn:numhits>` tag, which contains the number of results returned, and a series of `<autn:hit>` tags, which each contain a query result.

A query result consists of metadata for the result document, and the returned portions of the result document under the `<autn:content>` tag (in this example, each document is in a `<DOCUMENT>` subtree).

The important result document metadata tags are described in the following table.

`<autn:reference>` | The identifier for the document in the IDOL index.
`<autn:id>` | A unique number assigned to the document by the Content component where the document is indexed. The ID counts up from the first document indexed, and is unique only in a single Content component. In a distributed index, ID is not a reliable way to refer to a document in the index. As a best practice, always use references to refer to documents in IDOL Server.
`<autn:section>` | The section number of the result.
`<autn:weight>` | The relevancy score of the document to the query.
`<autn:links>` | The matching terms from the query that were found in the document.
`<autn:database>` | The database the result document came from.

The `<DOCUMENT>` subtree consists of field values for the document. The tag is the name of the document field, and the value of the tag is the value of the field in the document. For documents that you indexed in IDX format, this subtree is flat. For documents that you indexed in XML format, this subtree might have additional field structure, corresponding to the original XML.

Commonly, the reference for a document is stored in a field called `DREREFERENCE`, the content of a document is stored in a field called `DRECONTENT`, and the database name is stored in a field called `DREDBNAME`.

© 2016 Hewlett Packard Enterprise Development LP | Send documentation feedback to HPE Close We welcome your comments! To open the configured email client on this computer, open an email window. Otherwise, copy the information below to a web mail client, and send this email to AutonomyTPFeedback@hpe.com. Product: Topic Title: Help Topic: Feedback:

_HP_HTML5_bannerTitle.htm