/AWS1/IF_KND=>CREATETHESAURUS()¶
About CreateThesaurus¶
Creates a thesaurus for an index. The thesaurus contains a list of synonyms in Solr format.
For an example of adding a thesaurus file to an index, see Adding custom synonyms to an index.
Method Signature¶
METHODS /AWS1/IF_KND~CREATETHESAURUS
IMPORTING
!IV_INDEXID TYPE /AWS1/KNDINDEXID OPTIONAL
!IV_NAME TYPE /AWS1/KNDTHESAURUSNAME OPTIONAL
!IV_DESCRIPTION TYPE /AWS1/KNDDESCRIPTION OPTIONAL
!IV_ROLEARN TYPE /AWS1/KNDROLEARN OPTIONAL
!IT_TAGS TYPE /AWS1/CL_KNDTAG=>TT_TAGLIST OPTIONAL
!IO_SOURCES3PATH TYPE REF TO /AWS1/CL_KNDS3PATH OPTIONAL
!IV_CLIENTTOKEN TYPE /AWS1/KNDCLIENTTOKENNAME OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_kndcreatethesaurusrsp
RAISING
/AWS1/CX_KNDACCESSDENIEDEX
/AWS1/CX_KNDCONFLICTEXCEPTION
/AWS1/CX_KNDINTERNALSERVEREX
/AWS1/CX_KNDRESOURCENOTFOUNDEX
/AWS1/CX_KNDSERVICEQUOTAEXCDEX
/AWS1/CX_KNDTHROTTLINGEX
/AWS1/CX_KNDVALIDATIONEX
/AWS1/CX_KNDCLIENTEXC
/AWS1/CX_KNDSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_indexid TYPE /AWS1/KNDINDEXID /AWS1/KNDINDEXID¶
The identifier of the index for the thesaurus.
iv_name TYPE /AWS1/KNDTHESAURUSNAME /AWS1/KNDTHESAURUSNAME¶
A name for the thesaurus.
iv_rolearn TYPE /AWS1/KNDROLEARN /AWS1/KNDROLEARN¶
The Amazon Resource Name (ARN) of an IAM role with permission to access your S3 bucket that contains the thesaurus file. For more information, see IAM access roles for Amazon Kendra.
io_sources3path TYPE REF TO /AWS1/CL_KNDS3PATH /AWS1/CL_KNDS3PATH¶
The path to the thesaurus file in S3.
Optional arguments:¶
iv_description TYPE /AWS1/KNDDESCRIPTION /AWS1/KNDDESCRIPTION¶
A description for the thesaurus.
it_tags TYPE /AWS1/CL_KNDTAG=>TT_TAGLIST TT_TAGLIST¶
A list of key-value pairs that identify or categorize the thesaurus. You can also use tags to help control access to the thesaurus. Tag keys and values can consist of Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @.
iv_clienttoken TYPE /AWS1/KNDCLIENTTOKENNAME /AWS1/KNDCLIENTTOKENNAME¶
A token that you provide to identify the request to create a thesaurus. Multiple calls to the
CreateThesaurusAPI with the same client token will create only one thesaurus.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_kndcreatethesaurusrsp /AWS1/CL_KNDCREATETHESAURUSRSP¶
Domain /AWS1/RT_ACCOUNT_ID Primitive Type NUMC
Examples¶
Syntax Example¶
This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.
DATA(lo_result) = lo_client->createthesaurus(
io_sources3path = new /aws1/cl_knds3path(
iv_bucket = |string|
iv_key = |string|
)
it_tags = VALUE /aws1/cl_kndtag=>tt_taglist(
(
new /aws1/cl_kndtag(
iv_key = |string|
iv_value = |string|
)
)
)
iv_clienttoken = |string|
iv_description = |string|
iv_indexid = |string|
iv_name = |string|
iv_rolearn = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_thesaurusid = lo_result->get_id( ).
ENDIF.