Search requests are formed using the
ses-search element in
ses-request element. Example:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE ses-payload SYSTEM "http://www.infopark.com/ses.dtd"> <ses-payload payload-id="B42TE241" timestamp="20100825172100" ses.version="2.0"> <ses-header> <ses-sender sender-id="FX45RTDT" name="CM-Server"/> <ses-authentication login="cm-server" password=""/> </ses-header> <ses-request request-id="BR12TI5X"> <ses-search> <query parser="simple">www <#AND> business</query> <minRelevance>50</minRelevance> <maxDocs>200</maxDocs> <offset> <start>61</start> <length>20</length> </offset> <searchBase> <query parser="simple">title <#CONTAINS> business</query> <collection>collection1</collection> <collection>collection2</collection> </searchBase> <sortOrder> <sortField direction="desc">field23</sortField> ... </sortOrder> <resultRecord> <resultField format="ISO" timezone="MEZ" formatter="formatterAliasName">field1</resultField> ... </resultRecord> <searchDirection start="newest" /> </ses-search> </ses-request> </ses-payload>
In the following, the subelements of the
are described. If left out in the request, the defaults specified here,
maxDocs (the maximum number of
documents in the search result), are filled in by the Search Engine Server,
before the request is passed to the search engine module. This is only the
case if the Verity search engine module is used. The preprocessor, however,
always receives the original request document to which no default values
have been added.
parserattribute whose value can be
freetext. If the element is not specified, all indexed documents of the specified collection are returned. The content of the element is the search query, stated in the search processor’s syntax.
unlimitedmeans that as many hits are to be included in the results list as the platform supports.
start. Default: 20. If
offsetspecifies a partly or completely nonexistent subset of the search result, no documents, or only those documents present in the range, respectively, are returned. In these cases, no error message is generated.
ses-searchis executed. If the element is not present, all indexed documents in the specified collections are searched. The element has the optional
parserattribute, whose value can be
freetext. The content of the element is the search query stated in the search processor’s syntax.
score, i. e. by relevance. The element must have at least one and can have up to 16
sortFieldelement determines the name of a document field to be used as sorting criterion, taking into account the order of the elements. The first
sortFieldelement defines the primary sorting criterion, the second element the second criterion and so forth. Of each field value only the first 64 characters are taken into account. All available fields plus
scorecan be specified as sorting criterion.
sortFieldhas the optional
directionattribute which specifes the sort order. Valid values are
asc(ascending, the default) and
scoreare returned. Subelements:
resultFieldelement specifies the name of the field to be returned for each document. The content of
resultRecordmay contain several
resultFieldelements. All available fields as well as
scorecan be specified. If a nonexistent field is specified, then the empty value is returned as its value. The element has the three attributes
formatis the name of a date format used to format the field values concerned, provided they are date values. The format names and its formats are stored in the
validDateTimeOutputFormatssystem configuration entry (see Executing the Search Engine Server). By default, the first format specified there is used.
timezoneattribute can be used to specify the timezone into which date specifications are to be converted. By default the timezone of the server on which the Search Engine Server is running is used.
formatterattribute the values of the document fields returned can be formatted independently of their type. The value of the attribute is the alias name of a Tcl procedure. To this alias the true Tcl procedure name must have been assigned in the
tclFormatterCommandssystem configuration entry (see Executing the Search Engine Server).
startattribute. Its value can be
newest(the default) or
newestcauses the search to start with the most recent documents. Otherwise it starts with the oldest documents. The element does not have any content.