Querying Domino documents

The Query Document activity is used to query documents from the database in the Lotus® Domino® server that matches the values that are specified in the document fields.

You can specify one or more of the following criteria in the input data that is sent with the outbound request.
  • Document business data: When you specify the document business data in the Map Input section, the connector reads all the valid data from the map input. The connector searches the database for documents that match these valid data. All the matching documents that can be represented using the map output schema are returned as a response.
  • ParentDocumentUNID: When you specify a valid ParentDocumentUNID in the Map Input section, the connector queries all the child documents to this parent document. All the matching documents, which can be represented using the map output schema are returned as a response.
  • No data set: When you do not provide a data in the map input, the connector queries the documents that can be represented using the map output schema.
You can search for documents based on two types of search methods:
  1. Database Search method: Given selection criteria for a document, returns all documents in a database that meet the criteria. By default, the activity uses the Database Search method to search for documents. To explicitly set the search to this type, set the value of searchType optional parameter to NORMAL_SEARCH in the map input section. This method supports the search of documents that are based on the following types of search criteria:
    1. Single values: You can specify a single value in the search criteria. For example, the connector can query documents that are based on the single word, number, or date that is specified in the search field. You can find more information about the search values that can be specified in the Number and Date type fields in the following points.
      • Numbers: You can specify a double digit number or an integer value as the search criteria in the Numbers type field. You can use this search function to query documents where a Number type field equals to a certain value. For example, to query documents where employee salary equals to 1234.56, enter the value 1234.56 in the EmployeeSalary field.
      • Date: You can specify a date as the search criteria in any Date type field. For example, to query documents where birthday equals to 1982/11/22, specify the value 1982/11/22 in the Birthday field.
    2. Multiple values: You can specify multiple values as the search criteria for any Lotus® Domino® field types. This feature can be used to find the documents with the specified values at run time. For example, you can configure the connector to retrieve documents that match the words that are specified in the search criteria.
    3. Text search for rich text contents: You can specify the texts to search documents that have rich text contents at run time. The connector conducts a search by using the texts that are specified in the RichText field and all matching documents are retrieved by the connector. The connector supports both single and multiple text content searches for the RichText field. You can also provide wildcard suffixes, such as * for searching documents in the RichText field.
    4. Search using multiple fields: You can specify search values in more than one field. In this configuration, the activity uses the logical AND operator to group the search strings. For instance, you can specify a single value, multiple values, RichText, or ParentDocumentUNID in different fields. The activity returns only the search content that matches all the specified criteria.

  2. Database FTSearch/Indexed Search method: Conducts a full text search of all the documents in a database. When the database is fully indexed, the indexed search method is faster compared to the Database Search method. The method sorts the output data by relevance score. When the collection is sorted by relevance, the highest relevance appears first. To explicitly set the search to this type, set the value of searchType optional parameter to FULL_TEXT_SEARCH in the map input section.
    1. Search using multiple fields: The indexed search method also supports search using multiple fields. You can specify the search values in more than one field. In this configuration, the connector uses the logical AND operator to group the search strings. For instance, you can specify a single value, multiple values, or ParentDocumentUNID in different fields. The connector returns a logical AND operation of all the specified search criteria, returning exact and close matches for string type fields and exact matches for numeric type fields.
    Note: The indexed search method does not work for RichText, Attachments, and Date fields.
Using the Query Document activity
  1. Right-click Orchestration in the Project pane and click New Orchestration to create or open an orchestration. The orchestration pane is displayed.
  2. Select the Activities tab and expand the Domino folder.
  3. Drag Query Activity from the Domino folder onto the orchestration. A graphical representation of the orchestration along with the Checklist is displayed.
  4. Click Pick Endpoint, and then select a Domino endpoint.

    For instructions on creating or editing a Domino endpoint, see Creating or editing an endpoint for a Domino activity.

  5. Click Configure from the Checklist. The Configure pane is displayed.
    • Click Browse to select an existing database from the Browse Domino database pane. The Browse Domino databases display all the databases for the selected endpoint.
    • Click Next to select an existing form from the Browse Domino Forms pane. The Browse Domino Forms displays all the forms present in the selected database of the Domino server.
      Note: The Next button is enabled only after you have selected the database name.
    • Fields with canonical names accept fields that may have canonical names such as John Smith/IBM/COUNTRY as values, which are separated by commas. Specify the canonical names in this field if you want to convert the values in these fields to internet mail addresses, such as johnsmith@country.ibm.com. Some of the field name examples are To, From, CC, Chair, Required Attendees, and so on.

  6. Select the Map Inputs in the Checklist. The XML schemas generated from the selected object of the Query Documents activity are displayed as nodes under the request input parameter in the To Activity panel.

    For Form Types that are same across multiple databases, you can specify the database name as part of the optional parameters in map inputs, wherein the same orchestration can be used to perform outbound operations on different databases. To do this, you must specify the database name in the databaseName optional parameter (described in Table 1). If the databaseName parameter is populated with a value, the outbound operation is performed on the database specified in the databaseName parameter. If there is no value specified, the database name that is specified during configuration is used to perform the outbound operation.

    The optional input parameter is described in the following table:

    Table 1. Optional input parameter
    Parameter name Description
    databaseName databaseName is the name of the database from which the document is queried. If a value is set for this parameter, then the value of the database given in the configure panel will be overwritten. This parameter is useful when documents with the same structure (Form) need to be queried from multiple databases, using the same orchestration.
    The Domino connector also supports dynamic endpoint connection to a different Domino server. During run time, if you want to dynamically connect to a Domino server other than the one that is configured in the endpoint page, add the new optional parameters in dominoConnectionProperties of map inputs. The parameters of dominoConnectionProperties are described in the following table:
    Table 2. Optional connection parameters
    Parameters Description
    dominoConnectionProperties parameters
    hostName Specifies the host name or IP address of the machine on which Domino server is running.
    diiopPort Specifies the Domino Internet Inter-ORB Protocol (DIIOP) port that allows Java™ applets or applications to access Domino data remotely using CORBA. The default value is 63148.
    username Specifies the user name to connect to the Domino server.
    connectionPool parameters
    minimumConnections Specifies the lowest number of Domino server connections that the Integration Appliance keeps open in the connection pool. Entering 0 (zero) is supported. The default value is 5.
    maximumConnections Specifies the maximum number of Domino server connections that the Integration Appliance can keep open in the connection pool. Entering 0 (zero) means the maximum number of connections is unbounded. The default value is 25.
    maxIdleTime Specifies the amount of time in minutes that a Domino server connection can be open in an idle state before being closed by the Integration Appliance. Entering 0 (zero) means that the connections are closed when they are returned to the pool —no idle time. The default value is 120 minutes.
    maxWait Specifies the amount of time in seconds that the Integration Appliance waits for a connection when all the connections in the pool are exhausted. If no connection is obtained after the wait time, an exception is thrown. The default value is 300 seconds.
    reclaimConnections Specifies the interval at which the connector checks for idle connections. Idle connections are reclaimed until the minimum number of connections is reached, as specified in the Minimum Connections parameter. The default value is 5 minute.
    password Specifies the password that is associated with the user name to connect to the Domino server.
  7. Create a map between the orchestration variables and the input parameter of the activity.
    Note: Values must be provided at run time for any mandatory elements of the input structure. A value can be provided by specifying a default value for element or by linking the element with an input node. During run time if no value is provided for a mandatory element, the activity throws an exception, which is reported by the Web Management Console. If a value is not provided at run time for an optional input parameter, no exception is thrown during run time.
  8. Select the search type to be used for the activity:
    Table 3. Search type
    Parameter Name Description
    searchType Specifies the search type to be used for this activity. The values are:
    • NORMAL_SEARCH: Uses Domino Database Search method.
    • FULL_TEXT_SEARCH: Uses Domino Database FTSearch method.
    When no value is specified NORMAL_SEARCH is used.
  9. Select the Map Outputs in the checklist. The XML schemas generated to hold the response of the activity is displayed as nodes under the response output parameter in the From Activity panel.

    Note: Dynamically added fields present in the Domino document and not generated in the map input/output structures are handled by the Domino connector. While retrieving documents using this activity, the data for these fields are available in the map outputs section under AdditionalFields.

    queryUsingTimestamp is the parameter that is used to query documents that are based on time stamps. The timestamp property is a recursive property. You can define groupFields, name, operator, and value under the timestamp property.

    The optional output parameters are described in the following table:

    Parameter Name Description
    queryUsingTimestamp
    The following are the timestamp properties:
    Table 4. timestamp properties
    Property Values
    groupFields You can specify multiple values such as: AND, OR, (,), AND(, OR(, )AND, )OR, )AND(, and )OR(.
    Note: You can have multiple conditions. groupFields must be used when you have multiple conditions.
    name Specify one of these values: createdTimestamp or lastModifiedTimestamp
    operator Specify one of these values: GREATER_THAN, GREATER_THAN_OR_EQUAL_TO, EQUAL_TO, LESS_THAN, LESS_THAN_OR_EQUAL_TO, and NOT_EQUAL_TO
    value Specify the date and time values. For example, 26-09-2013 12:05:00 PM EST.
    Note: If you do not mention the timezone, by default, the timezone of the server is considered.

    Note:
    • Querying documents that are based on the NOT_EQUAL_TO operator (!=) is not supported in Full Text Search.
    • Querying documents using time is not supported in Full Text Search. For example, [_RevisionDate] = 05/06/2013 09:30:00.
    • Querying documents using the EQUAL_TO operator with timestamp does not work with the Normal Search type. For example, @Modified = [05/06/2013 09:14:22].
    • Querying documents using Full Text Search as the Search Type, you can query documents that are only based on Date; and not DateTime. For example, lastModfiedDateTime >= 05/20/2013 20:00:00 is not supported in Full Text Search.
  10. Create a map between the output parameters and orchestration variables.
You have configured the Domino Query Documents activity.



Feedback | Notices


Timestamp icon Last updated: Tuesday, 27 September 2016


http://pic.dhe.ibm.com/infocenter/wci/v7r0m0/topic/com.ibm.wci.doc/Domino_query_outactivity.html