I want Watson Discovery to add any metadata to the document.

Asked 2 years ago, Updated 2 years ago, 88 views

Learn how to add any metadata to the document in Curl from the Watson API Discovery.
Discovery's API references contain phrases that allow you to specify metadata when adding or updating documents (excerpt from the metadata section of JSON object specifying metadata related to the document.), but they do not appear to contain any specific format.
https://www.ibm.com/watson/developercloud/discovery/api/v1/ #add-doc

Is it possible to add arbitrary metadata to the document?
If possible, I would appreciate it if you could let me know the specific method.

watson-api

2022-09-30 18:32

1 Answers

As a result of my own verification, it seems that the file and metadata parameters cannot be used together during API calls.
If you want to use metadata, you can use the metadata field by writing "extracted_metadata" in the json file.
Data registered in the extracted_metadata information is not subject to discovery search, but can be retrieved from the search results.

Example

{
 "question": "Discovery is not connected",
 "answer": "Contact support.Please check the link for details of the inquiry.",
 "extracted_metadata": {
  "url": "https://<any URL>"
 }
}


2022-09-30 18:32

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.