Connector Framework Server 25.1
Connector Framework Server Help

# send_agent_query

The `send_agent_query` function queries an Agentstore for agents matching the provided document.

## Syntax

    send_agent_query( doc [, params] )

## Arguments

Argument | Description
--- | ---
`doc` | (LuaDocument) The document for which you want to find agents.
`params` | (table) Named parameters that configure the query. The table maps parameter names (String) to parameter values. For information about the parameters that you can set, see the following table. For information about how to use named parameters refer to the Connector Framework Server Administration Guide.

## Named Parameters

Named Parameter | Description | Configuration Parameter
--- | --- | ---
`section` | (string) The name of a section in the CFS configuration file. If you set this then any parameters not set in the parameters table are read from this section of the configuration file. |
`host` | (string) The host name or IP address of the Agentstore. | `Host`
`port` | (integer) The ACI port of the Agentstore. | `Port`
`fields` | (table) The fields in the document to use when searching for agents. This takes the form of a table which maps field names in the document to field names in the query. |
`field_boolean` | (string) The method used to join the field specifications. Must be `"AND"`, `"OR"`, `"XOR"`, `"EOR"`, or `"NOT"`. |
`query_with_full_document` | (boolean) To use the full document in the query, set this argument to `true`. If you use the full document, the `fields` and `field_boolean` arguments are ignored. The default value is `false`. |
`extra_parameters` | (table) Additional parameters to include in the query. This takes the form of a table that maps action parameters to specific values. |
`ssl_section` | (string) The name of the section in the CFS configuration file that contains SSL settings for outgoing communication. | `SSLConfig`

## Returns

String. The XML response, detailing any matching agents. You must use `parse_agent_response` to convert the response into a usable form (see parse_agent_response).

## Example

    local agent_response = send_agent_query(
       document, {host = "server", port = 9090,
       fields = {DRETITLE = "training", DRECONTENT = "training"}})

Copyright 2024 Open Text
Version 25.1 | Last updated January 2025

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to MFI-swpdl.idoldocsfeedback@opentext.com.

We appreciate your feedback!

Product: Knowledge Discovery Connector Framework Server 25.1

Topic Title: send_agent_query