search_results
Creates, updates, deletes, gets or lists a search_results resource.
Overview
| Name | search_results |
| Type | Resource |
| Id | aws.iotsitewise.search_results |
Fields
The following fields are returned by SELECT queries:
- get_search_results
| Name | Datatype | Description |
|---|---|---|
dataset_id | string | The identifier of the dataset that contains the matching data. (pattern: <code>^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$</code>) |
end_timestamp | object | Contains a timestamp with optional nanosecond granularity. |
score | number (float) | The relevance score of this result. Higher scores indicate a stronger match. |
search_id | string | The unique identifier of a search, assigned by the service when the search is started. (pattern: <code>[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*</code>) |
start_timestamp | object | Contains a timestamp with optional nanosecond granularity. |
time_series_id | string | The identifier of the time series that contains the matching data. |
top_timestamp | object | Contains a timestamp with optional nanosecond granularity. |
workspace_name | string | The name of the workspace the search ran against. (pattern: <code>^[a-zA-Z0-9_-]+$</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_search_results | select | search_id, workspace_name, region | maxResults, nextToken | Retrieves the ranked results of a search, ordered by descending relevance score. Results are available only after the search has reached the SUCCEEDED status. Calling this on a search that exists but has not yet completed returns InvalidRequestException, while calling it on a search that does not exist returns ResourceNotFoundException. The response is paginated: when nextToken is present, pass it on a subsequent call to retrieve the next page. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
search_id | string | The identifier of the search whose results are retrieved. |
workspace_name | string | 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. |
SELECT examples
- get_search_results
Retrieves the ranked results of a search, ordered by descending relevance score. Results are available only after the search has reached the SUCCEEDED status. Calling this on a search that exists but has not yet completed returns InvalidRequestException, while calling it on a search that does not exist returns ResourceNotFoundException. The response is paginated: when nextToken is present, pass it on a subsequent call to retrieve the next page.
SELECT
dataset_id,
end_timestamp,
score,
search_id,
start_timestamp,
time_series_id,
top_timestamp,
workspace_name
FROM aws.iotsitewise.search_results
WHERE search_id = '{{ search_id }}' -- required
AND workspace_name = '{{ workspace_name }}' -- required
AND region = '{{ region }}' -- required
AND maxResults = '{{ maxResults }}'
AND nextToken = '{{ nextToken }}'
;