Response

The response to a search request is coded in the searchResults element in the response payload. This element is located below the ses-code element. It contains the requested subset of the search result. This subset is determined by the offset element contained in the request. Example:

<?xml version="1.0"?>
<!DOCTYPE ses-payload SYSTEM "http://www.example.com/ses.dtd">
<ses-payload payload-id="d--1950259307-000000004-X" timestamp="20101017150655" version="2.1">
  <ses-header>
    <ses-sender sender-id="SES-ACME-DEV-0" name="SES"/>
    <ses-receiver name="CM Server" receiver-id="CM-ACME-DEV-0"/>
  </ses-header>
  <ses-response response-id="0"
       request-id="d--1949717044-000000006-X" success="true">
    <ses-code phrase="OK" numeric="200">
      <searchResults hits="567" searched="2045381">
        <record index="21" offsetIndex="1">
          <title>A sample Document</title>
          <score>77</score>
          <docId>546381</docId>
        </record>
        ...
      </searchResults>
    </ses-code>
  </ses-response>
</ses-payload>

The searchResults element has the two attributes hits and searched. The value of hits specifies the total number of hits contained in the search result. The value of searched specifies the total number of documents that were searched. The content of searchResults is a list of record elements:

  • record
    Each hit is represented by a record element. The element has the two attributes index and offsetIndex. The value of index is the index of the document in the complete search result, while offsetIndex is the index of the document in the requested subset of the search result. For both values the smallest value is 1.
    The content of the element is a list of elements each of which is the name of a document field (see Content Indexing). For each of the elements a corresponding resultField element was present in the search query.
    The content of a document field element is the value of the document field after formatting. Formatting can be achieved by means of the format, timezone, and formatter attributes in the corresponding resultField elements included in the search request.