IoTSiteWise / Client / get_search_results
get_search_results¶
- IoTSiteWise.Client.get_search_results(**kwargs)¶
Retrieves the ranked results of a search, ordered by descending relevance score. Results are available only after the search has reached the
SUCCEEDEDstatus. Calling this on a search that exists but has not yet completed returnsInvalidRequestException, while calling it on a search that does not exist returnsResourceNotFoundException. The response is paginated: whennextTokenis present, pass it on a subsequent call to retrieve the next page.See also: AWS API Documentation
Request Syntax
response = client.get_search_results( searchId='string', workspaceName='string', maxResults=123, nextToken='string' )
- Parameters:
searchId (string) –
[REQUIRED]
The identifier of the search whose results are retrieved.
workspaceName (string) –
[REQUIRED]
The name of the workspace the search belongs to.
maxResults (integer) – The maximum number of results to return in a single page. Valid range is 1 to 10,000; if omitted, a service-defined default is used.
nextToken (string) – The pagination token returned by a previous GetSearchResults call. Provide it to retrieve the next page of results; omit it to retrieve the first page.
- Return type:
dict
- Returns:
Response Syntax
{ 'searchResults': [ { 'searchId': 'string', 'workspaceName': 'string', 'datasetId': 'string', 'timeSeriesId': 'string', 'startTimestamp': { 'timeInSeconds': 123, 'offsetInNanos': 123 }, 'endTimestamp': { 'timeInSeconds': 123, 'offsetInNanos': 123 }, 'topTimestamp': { 'timeInSeconds': 123, 'offsetInNanos': 123 }, 'score': ... }, ], 'nextToken': 'string' }
Response Structure
(dict) –
Output of the GetSearchResults operation.
searchResults (list) –
A page of search results, ordered by descending relevance score.
(dict) –
A single matching segment of time-series data returned by a search.
searchId (string) –
The identifier of the search that produced this result.
workspaceName (string) –
The name of the workspace the search ran against.
datasetId (string) –
The identifier of the dataset that contains the matching data.
timeSeriesId (string) –
The identifier of the time series that contains the matching data.
startTimestamp (dict) –
The start of the matching time-series segment, in nanoseconds since the Unix epoch.
timeInSeconds (integer) –
The timestamp date, in seconds, in the Unix epoch format. Fractional nanosecond data is provided by
offsetInNanos.offsetInNanos (integer) –
The nanosecond offset from
timeInSeconds.
endTimestamp (dict) –
The end of the matching time-series segment, in nanoseconds since the Unix epoch.
timeInSeconds (integer) –
The timestamp date, in seconds, in the Unix epoch format. Fractional nanosecond data is provided by
offsetInNanos.offsetInNanos (integer) –
The nanosecond offset from
timeInSeconds.
topTimestamp (dict) –
The timestamp of the most relevant point within the matching segment, in nanoseconds since the Unix epoch.
timeInSeconds (integer) –
The timestamp date, in seconds, in the Unix epoch format. Fractional nanosecond data is provided by
offsetInNanos.offsetInNanos (integer) –
The nanosecond offset from
timeInSeconds.
score (float) –
The relevance score of this result. Higher scores indicate a stronger match.
nextToken (string) –
The pagination token to use in a subsequent GetSearchResults call to retrieve the next page. Absent when there are no more results.
Exceptions