Skip to content

/AWS1/IF_IOS=>STARTSEARCH()

About StartSearch

Starts an asynchronous search over the data in a workspace. The search runs in the background; the response returns immediately with a searchId and an initial status of QUEUED. Use DescribeSearch to poll for completion and GetSearchResults to retrieve the results once the search reaches SUCCEEDED. The request is idempotent on clientToken: repeating a call with the same token returns the original search instead of starting a new one.

Method Signature

METHODS /AWS1/IF_IOS~STARTSEARCH
  IMPORTING
    !IV_WORKSPACENAME TYPE /AWS1/IOSWORKSPACENAME OPTIONAL
    !IV_QUERYSTATEMENT TYPE /AWS1/IOSSEARCHQUERYSTATEMENT OPTIONAL
    !IV_CLIENTTOKEN TYPE /AWS1/IOSCLIENTTOKEN OPTIONAL
    !IV_SEARCHTYPE TYPE /AWS1/IOSSEARCHTYPE OPTIONAL
    !IO_SEARCHFILTERS TYPE REF TO /AWS1/CL_IOSSEARCHFILTERS OPTIONAL
    !IV_GROUPID TYPE /AWS1/IOSGROUPID OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_iosstartsearchrsp
  RAISING
    /AWS1/CX_IOSACCESSDENIEDEX
    /AWS1/CX_IOSCNFLCTOPERATIONEX
    /AWS1/CX_IOSINTERNALFAILUREEX
    /AWS1/CX_IOSINVALIDREQUESTEX
    /AWS1/CX_IOSLIMITEXCEEDEDEX
    /AWS1/CX_IOSRESOURCENOTFOUNDEX
    /AWS1/CX_IOSTHROTTLINGEX
    /AWS1/CX_IOSCLIENTEXC
    /AWS1/CX_IOSSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_workspacename TYPE /AWS1/IOSWORKSPACENAME /AWS1/IOSWORKSPACENAME

The name of the workspace whose data is searched.

iv_querystatement TYPE /AWS1/IOSSEARCHQUERYSTATEMENT /AWS1/IOSSEARCHQUERYSTATEMENT

The natural-language query describing the data to search for.

Optional arguments:

iv_clienttoken TYPE /AWS1/IOSCLIENTTOKEN /AWS1/IOSCLIENTTOKEN

A unique, case-sensitive identifier you provide to ensure the request is idempotent. Repeating a StartSearch call with the same clientToken returns the original search rather than starting a new one. If omitted, the SDK autogenerates one.

iv_searchtype TYPE /AWS1/IOSSEARCHTYPE /AWS1/IOSSEARCHTYPE

The search strategy to use. Defaults to QUICK when omitted.

io_searchfilters TYPE REF TO /AWS1/CL_IOSSEARCHFILTERS /AWS1/CL_IOSSEARCHFILTERS

Optional filters that restrict the search to a subset of the workspace's data.

iv_groupid TYPE /AWS1/IOSGROUPID /AWS1/IOSGROUPID

An optional caller-supplied identifier used to group related searches together.

RETURNING

oo_output TYPE REF TO /aws1/cl_iosstartsearchrsp /AWS1/CL_IOSSTARTSEARCHRSP

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->startsearch(
  io_searchfilters = new /aws1/cl_iossearchfilters(
    it_datasetids = VALUE /aws1/cl_iosdatasetidlist_w=>tt_datasetidlist(
      ( new /aws1/cl_iosdatasetidlist_w( |string| ) )
    )
    it_timeintervals = VALUE /aws1/cl_iostimeinterval=>tt_timeintervallist(
      (
        new /aws1/cl_iostimeinterval(
          io_endtime = new /aws1/cl_iostimeinnanos(
            iv_offsetinnanos = 123
            iv_timeinseconds = 123
          )
          io_starttime = new /aws1/cl_iostimeinnanos(
            iv_offsetinnanos = 123
            iv_timeinseconds = 123
          )
        )
      )
    )
    it_timeseriesids = VALUE /aws1/cl_iostimeseriesidlist_w=>tt_timeseriesidlist(
      ( new /aws1/cl_iostimeseriesidlist_w( |string| ) )
    )
  )
  iv_clienttoken = |string|
  iv_groupid = |string|
  iv_querystatement = |string|
  iv_searchtype = |string|
  iv_workspacename = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_searchid = lo_result->get_searchid( ).
  lv_workspacename = lo_result->get_workspacename( ).
  lv_searchstatus = lo_result->get_status( ).
  lv_groupid = lo_result->get_groupid( ).
ENDIF.