/AWS1/IF_GLU=>SEARCHASSETS()¶
About SearchAssets¶
Searches for assets in Glue Data Catalog using full-text search, filters, sorting, and aggregations. Returns matching assets with relevance-ranked results.
Method Signature¶
METHODS /AWS1/IF_GLU~SEARCHASSETS
IMPORTING
!IV_SEARCHTEXT TYPE /AWS1/GLUSEARCHTEXT OPTIONAL
!IV_MAXRESULTS TYPE /AWS1/GLUSEARCHMAXRESULTS OPTIONAL
!IV_NEXTTOKEN TYPE /AWS1/GLUSEARCHNEXTTOKEN OPTIONAL
!IO_SORT TYPE REF TO /AWS1/CL_GLUSEARCHSORT OPTIONAL
!IO_FILTERCLAUSE TYPE REF TO /AWS1/CL_GLUSEARCHFILTERCLAUSE OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_glusearchassetsoutput
RAISING
/AWS1/CX_GLUACCESSDENIEDEX
/AWS1/CX_GLUINTERNALSERVICEEX
/AWS1/CX_GLUINVALIDINPUTEX
/AWS1/CX_GLUTHROTTLINGEX
/AWS1/CX_GLUCLIENTEXC
/AWS1/CX_GLUSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Optional arguments:¶
iv_searchtext TYPE /AWS1/GLUSEARCHTEXT /AWS1/GLUSEARCHTEXT¶
The text to search for. At least one of
searchTextorfilterClausemust be provided.
iv_maxresults TYPE /AWS1/GLUSEARCHMAXRESULTS /AWS1/GLUSEARCHMAXRESULTS¶
The maximum number of results to return in the response.
iv_nexttoken TYPE /AWS1/GLUSEARCHNEXTTOKEN /AWS1/GLUSEARCHNEXTTOKEN¶
A continuation token, if this is a continuation call.
io_sort TYPE REF TO /AWS1/CL_GLUSEARCHSORT /AWS1/CL_GLUSEARCHSORT¶
The sort criteria for the search results.
io_filterclause TYPE REF TO /AWS1/CL_GLUSEARCHFILTERCLAUSE /AWS1/CL_GLUSEARCHFILTERCLAUSE¶
The filter clause to apply to the search. Supports nested AND/OR logic with attribute-level and map-level filters.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_glusearchassetsoutput /AWS1/CL_GLUSEARCHASSETSOUTPUT¶
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->searchassets(
io_filterclause = new /aws1/cl_glusearchfilterclause(
io_attributefilter = new /aws1/cl_glusearchattrfilter(
io_value = new /aws1/cl_glusearchfiltervalue(
iv_longvalue = 123
iv_stringvalue = |string|
)
iv_attribute = |string|
iv_operator = |string|
)
io_mapfilter = new /aws1/cl_glusearchmapfilter(
io_value = new /aws1/cl_glusrchmapfiltervalue( |string| )
iv_attribute = |string|
iv_key = |string|
)
it_andallfilters = VALUE /aws1/cl_glusearchfilterclause=>tt_searchfilterclauselist(
(
new /aws1/cl_glusearchfilterclause(
io_attributefilter = new /aws1/cl_glusearchattrfilter(
io_value = new /aws1/cl_glusearchfiltervalue(
iv_longvalue = 123
iv_stringvalue = |string|
)
iv_attribute = |string|
iv_operator = |string|
)
io_mapfilter = new /aws1/cl_glusearchmapfilter(
io_value = new /aws1/cl_glusrchmapfiltervalue( |string| )
iv_attribute = |string|
iv_key = |string|
)
it_oranyfilters = VALUE /aws1/cl_glusearchfilterclause=>tt_searchfilterclauselist(
)
)
)
)
it_oranyfilters = VALUE /aws1/cl_glusearchfilterclause=>tt_searchfilterclauselist(
(
new /aws1/cl_glusearchfilterclause(
io_attributefilter = new /aws1/cl_glusearchattrfilter(
io_value = new /aws1/cl_glusearchfiltervalue(
iv_longvalue = 123
iv_stringvalue = |string|
)
iv_attribute = |string|
iv_operator = |string|
)
io_mapfilter = new /aws1/cl_glusearchmapfilter(
io_value = new /aws1/cl_glusrchmapfiltervalue( |string| )
iv_attribute = |string|
iv_key = |string|
)
it_andallfilters = VALUE /aws1/cl_glusearchfilterclause=>tt_searchfilterclauselist(
)
)
)
)
)
io_sort = new /aws1/cl_glusearchsort(
iv_attribute = |string|
iv_order = |string|
)
iv_maxresults = 123
iv_nexttoken = |string|
iv_searchtext = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
LOOP AT lo_result->get_items( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_assetid = lo_row_1->get_id( ).
lv_searchresultname = lo_row_1->get_assetname( ).
lv_assetdescription = lo_row_1->get_assetdescription( ).
lv_updatedat = lo_row_1->get_updatedat( ).
lv_assettypeid = lo_row_1->get_assettypeid( ).
ENDIF.
ENDLOOP.
lv_searchnexttoken = lo_result->get_nexttoken( ).
ENDIF.