Table of Contents
The XML interface is a fast and direct approach to searchbox integration into proprietary applications. It consists in an HTTP GET request that outputs the query results as an XML file and lets you get the documents stored by searchbox.
The URL on which you will operate can be one of these:
http://ENDPOINT/archive/X?params...
where ENDPOINT is the address of the
searchbox server (hostname and port) and
X is the archive IDs on which the query
is to be executed.
http://ENDPOINT/collection/X?params...
where ENDPOINT is the address of the
searchbox server (hostname and port) and
X is a collection ID on which the
query is to be executed (you can use -1
as a special value to query all the archives that the
current user can access).
http://ENDPOINT/doc/DOCID where
ENDPOINT is the address of the searchbox
server (hostname and port) and DOCID is
the document ID of a document stored by searchbox.
The HTTP request must be made using HTTP authentication,
so with some HTTP clients the ENDPOINT will be something like
admin:password@localhost:2200.
The parameters that follows the ?
follows the HTTP GET parameter encoding rules and can be one or
more of the following:
X is the query string. This parameter is required and the query string can be empty.
X is the oldest timestamp (expressed as number of seconds passed since 01/01/1970 00:00:00 GMT) allowed for query results, that is only documents newer than X will be returned.
X is the newest timestamp (expressed as number of seconds passed since 01/01/1970 00:00:00 GMT) allowed for query results, that is only documents older than X will be returned.
X is the minimum score that a document must have to be returned by the query.
X is the position of the first document to be returned, useful for paginating the results.
X is the number of documents to be returned (default is 10), useful for paginating the results.
X can be one of the following:
means that only document ID is returned for each query result.
means that also the document URL is returned for each query result.
means that also the document title is returned for each query result.
means that also the query context is returned for each query result.
means that also the template medatata is returned for each query result.
means that also all metadata is returned for each query result.
X can be one of the following:
means that all the documents are eligible for searching.
means that only the documents that changed in the core text are eligible for searching.
X can be one of the following:
means that standard sorting will be used.
means that relevance sorting will be used.
means that document score sorting will be used.
means that time sorting will be used (newer document first).
means that time sorting will be used (older document first).
S is a slice id (see slice and dictionary ids for possible values), X is the integer weight to use for the slice during this query.
When accessing the
http://ENDPOINT/doc/DOCID URL you can pass an
HTTP Accept header in your GET request
specifiying the type
application/vnd.focuseek-fff to get the
document translated into FFF form[6] or text/html to get an HTML
approximation of the document. If the request contains no
Accept header the document is returned in its
original format. In any case searchbox sets the
Content-Type header in the reply to the
mimetype of the document it sends back.