管理 Watson Discovery 叢集上的自訂搜索器外掛程式

您可以使用 scripts/manage_crawler_plugin.sh 指令碼來執行常見的外掛程式管理動作。 scripts/manage_crawler_plugin.sh Script 位於搜索器外掛程式 SDK 套件中。 在指令中使用該 Script 時,必須提供 Discovery 叢集的端點 URL 以及 IBM Cloud Pak® for Data 實例的使用者名稱及密碼。

IBM Cloud Pak for Data IBM Software Hub

此資訊僅適用於已安裝的部署。

用於管理搜索器外掛程式的指令和選項

您可以輸入 scripts/manage_crawler_plugin.sh --help 來檢視 Script 中的下列說明訊息:

Usage: scripts/manage_crawler_plugin.sh --endpoint endpoint --user username [--password password] command

Watson Discovery Crawler Plug-in Manager

This script will help you deploy, undeploy, and list your crawler plug-ins for Watson Discovery.

Commands:
deploy        Add a new crawler plug-in to your Watson Discovery instance
undeploy      Undeploy your crawler plug-in by ID
list          List all crawler plug-ins for your Watson Discovery instance (default)

Options:
-e --endpoint         The endpoint URL for your cluster and add-on service instance
                      (https://{cpd_cluster_host}{: port}/discovery/{release}/instances/{instance_id}/api)
-u --user             The user name of your Cloud Pak instance
-p --password         The user password of your Cloud Pak instance
                      If the password is not specified, the command line prompts to input
-n --name             The name of the crawler plug-in to upload (deploy only)
-f --file             The path of the crawler plug-in package to upload (deploy only)
--id                  The crawler_resource_id value to delete the crawler plug-in (undeploy only)
--help                Show this message

您可以使用下列指令來部署、取消部署和列出搜索器外掛程式: 將變數引用 {variable} 替換為所需的資訊:

  • 部署搜索器外掛程式:scripts/manage_crawler_plugin.sh --endpoint {endpoint_URL} --user {username} deploy --name {plugin_name}
  • 取消部署搜索器外掛程式:scripts/manage_crawler_plugin.sh --endpoint {endpoint_URL} --user {username} undeploy --id {crawler_resource_id}
  • 列出已部署的搜索器外掛程式:scripts/manage_crawler_plugin.sh --endpoint {endpoint_URL} --user {username} list

使用 scripts/manage_crawler_plugin.sh Script 部署搜索器外掛程式後,可以在 Discovery 工具中選取該外掛程式來建立集合。 如需 Discovery 中搜索器外掛程式設定的相關資訊,請參閱搜索器外掛程式設定。