The search action performs a full-text search on all places on all IBM Lotus Quickr servers in the Lotus Quickr service. To use it you must first configure servers for cross-place searching.
To access the search API, two input files are required: one specifying the search query, and another specifying the distinguished name of the user performing the search. The first file is run using the -i argument, the second is run using the -session argument. For example, you can create an input file specifying the query called input.xml, and another file specifying the user called session.xml. To run the search, enter the following command on the command line:
java com.lotus.quickplace.api.QPAPI -i input.xml -session session.xml
An error action status is returned if the local server's Lotus Quickr configuration specifies that the cross-place searching (Search Places) feature is disabled altogether, or disabled for anonymous users and the user performing the search is anonymous.
You can also access the search functionality by calling this method in a Java program
QPAPI.process( String sessionFileName, String inFileName, String outFileName)
Lotus Quickr API actions are always performed on the local server (the server executing the XML). Therefore, in order to perform a domain search, the search action must be run on the server that is configured for Domain Search and contains the Domain Index.
The session file is needed to provide the identity of the user executing the search so that only documents the user has access to are returned.
Syntax for the input file
<QUERY count="n" start="n" order="score | asc | desc">
is a required attribute, and start
are optional attributes that may be omitted.
Syntax for the session file
Supported elements for the input file
<DN>distinguished name of user performing search</DN>
- order - A value that specifies the search return sort order. The following values are supported:
- score - Return results sorted by relevance
- asc- Return results sorted with oldest occurrences first
- desc- Return results sorted with newest occurrences first
- start - Specifies the starting position of the search results to be returned. A value of zero is used if this attribute is not specified. A starting position of zero specifies that results starting with the first match should be returned.
- count - Specifies the maximum number of search match hits to be returned. A value of 15 is used if this attribute is not specified. A value of -1 specifies that all hits should be returned.
Supported elements for the session file
<QUERY count="100" start="0" order="score">
The session element represents the connection to the server. Because Search Places only returns results according to the users access to places, rooms, and documents when searching for a document, Search Places must know who is requesting the search. This information is contained in the session node.
The person element specifies the distinguished name of the user performing the search. For example:
Following is an example of the XML returned by performing a search for the word: Lotus Quickr
<![CDATA[ Lotus Quickr Sales Forecast & Sales Staff:
Please review this document for accuracy and make
edits and corrections as necessary. This document
is used by the ACME Global Sales staff to determine
the impact of Lotus Quickr.]]>
Return to the Java API overview and index