AWS CLI version 2, the latest major version of AWS CLI, is now stable and recommended for general use. To view this page for the AWS CLI version 2, click here. For more information see the AWS CLI version 2 installation instructions and migration guide.
Retrieves relevant passages or text excerpts given an input query.
This API is similar to the Query API. However, by default, the Query
API only returns excerpt passages of up to 100 token words. With the Retrieve
API, you can retrieve longer passages of up to 200 token words and up to 100 semantically relevant passages. This doesn't include question-answer or FAQ type responses from your index. The passages are text excerpts that can be semantically extracted from multiple documents and multiple parts of the same document. If in extreme cases your documents produce zero passages using the Retrieve
API, you can alternatively use the Query
API and its types of responses.
You can also do the following:
You can also include certain fields in the response that might provide useful additional information.
The Retrieve
API shares the number of query capacity units that you set for your index. For more information on what's included in a single capacity unit and the default base capacity for an index, see Adjusting capacity .
See also: AWS API Documentation
retrieve
--index-id <value>
--query-text <value>
[--attribute-filter <value>]
[--requested-document-attributes <value>]
[--document-relevance-override-configurations <value>]
[--page-number <value>]
[--page-size <value>]
[--user-context <value>]
[--cli-input-json <value>]
[--generate-cli-skeleton <value>]
[--debug]
[--endpoint-url <value>]
[--no-verify-ssl]
[--no-paginate]
[--output <value>]
[--query <value>]
[--profile <value>]
[--region <value>]
[--version <value>]
[--color <value>]
[--no-sign-request]
[--ca-bundle <value>]
[--cli-read-timeout <value>]
[--cli-connect-timeout <value>]
--index-id
(string)
The identifier of the index to retrieve relevant passages for the search.
--query-text
(string)
The input query text to retrieve relevant passages for the search. Amazon Kendra truncates queries at 30 token words, which excludes punctuation and stop words. Truncation still applies if you use Boolean or more advanced, complex queries. For example,Timeoff AND October AND Category:HR
is counted as 3 tokens:timeoff
,october
,hr
. For more information, see Searching with advanced query syntax in the Amazon Kendra Developer Guide.
--attribute-filter
(structure)
Filters search results by document fields/attributes. You can only provide one attribute filter; however, the
AndAllFilters
,NotFilter
, andOrAllFilters
parameters contain a list of other filters.The
AttributeFilter
parameter means you can create a set of filtering rules that a document must satisfy to be included in the query results.AndAllFilters -> (list)
Performs a logical
AND
operation on all filters that you specify.(structure)
Filters the search results based on document attributes or fields.
You can filter results using attributes for your particular documents. The attributes must exist in your index. For example, if your documents include the custom attribute "Department", you can filter documents that belong to the "HR" department. You would use the
EqualsTo
operation to filter results or documents with "Department" equals to "HR".You can use
AndAllFilters
andAndOrFilters
in combination with each other or with other operations such asEqualsTo
. For example:AndAllFilters
EqualsTo
: "Department", "HR"AndOrFilters
ContainsAny
: "Project Name", ["new hires", "new hiring"]This example filters results or documents that belong to the HR department and belong to projects that contain "new hires" or "new hiring" in the project name (must use
ContainAny
withStringListValue
). This example is filtering with a depth of 2.You cannot filter more than a depth of 2, otherwise you receive a
ValidationException
exception with the message "AttributeFilter cannot have a depth of more than 2." Also, if you use more than 10 attribute filters in a given list forAndAllFilters
orOrAllFilters
, you receive aValidationException
with the message "AttributeFilter cannot have a length of more than 10".For examples of using
AttributeFilter
, see Using document attributes to filter search results .AndAllFilters -> (list)
Performs a logical
AND
operation on all filters that you specify.( ... recursive ... )
OrAllFilters -> (list)
Performs a logical
OR
operation on all filters that you specify.( ... recursive ... )
( ... recursive ... )EqualsTo -> (structure)
Performs an equals operation on document attributes/fields and their values.
Key -> (string)
The identifier for the attribute.Value -> (structure)
The value of the attribute.
StringValue -> (string)
A string, such as "department".StringListValue -> (list)
A list of strings. The default maximum length or number of strings is 10.
(string)
LongValue -> (long)
A long integer value.DateValue -> (timestamp)
A date expressed as an ISO 8601 string.
It is important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
ContainsAll -> (structure)
Returns true when a document contains all of the specified document attributes/fields. This filter is only applicable to StringListValue .
Key -> (string)
The identifier for the attribute.Value -> (structure)
The value of the attribute.
StringValue -> (string)
A string, such as "department".StringListValue -> (list)
A list of strings. The default maximum length or number of strings is 10.
(string)
LongValue -> (long)
A long integer value.DateValue -> (timestamp)
A date expressed as an ISO 8601 string.
It is important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
ContainsAny -> (structure)
Returns true when a document contains any of the specified document attributes/fields. This filter is only applicable to StringListValue .
Key -> (string)
The identifier for the attribute.Value -> (structure)
The value of the attribute.
StringValue -> (string)
A string, such as "department".StringListValue -> (list)
A list of strings. The default maximum length or number of strings is 10.
(string)
LongValue -> (long)
A long integer value.DateValue -> (timestamp)
A date expressed as an ISO 8601 string.
It is important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
GreaterThan -> (structure)
Performs a greater than operation on document attributes/fields and their values. Use with the document attribute type
Date
orLong
.Key -> (string)
The identifier for the attribute.Value -> (structure)
The value of the attribute.
StringValue -> (string)
A string, such as "department".StringListValue -> (list)
A list of strings. The default maximum length or number of strings is 10.
(string)
LongValue -> (long)
A long integer value.DateValue -> (timestamp)
A date expressed as an ISO 8601 string.
It is important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
GreaterThanOrEquals -> (structure)
Performs a greater or equals than operation on document attributes/fields and their values. Use with the document attribute type
Date
orLong
.Key -> (string)
The identifier for the attribute.Value -> (structure)
The value of the attribute.
StringValue -> (string)
A string, such as "department".StringListValue -> (list)
A list of strings. The default maximum length or number of strings is 10.
(string)
LongValue -> (long)
A long integer value.DateValue -> (timestamp)
A date expressed as an ISO 8601 string.
It is important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
LessThan -> (structure)
Performs a less than operation on document attributes/fields and their values. Use with the document attribute type
Date
orLong
.Key -> (string)
The identifier for the attribute.Value -> (structure)
The value of the attribute.
StringValue -> (string)
A string, such as "department".StringListValue -> (list)
A list of strings. The default maximum length or number of strings is 10.
(string)
LongValue -> (long)
A long integer value.DateValue -> (timestamp)
A date expressed as an ISO 8601 string.
It is important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
LessThanOrEquals -> (structure)
Performs a less than or equals operation on document attributes/fields and their values. Use with the document attribute type
Date
orLong
.Key -> (string)
The identifier for the attribute.Value -> (structure)
The value of the attribute.
StringValue -> (string)
A string, such as "department".StringListValue -> (list)
A list of strings. The default maximum length or number of strings is 10.
(string)
LongValue -> (long)
A long integer value.DateValue -> (timestamp)
A date expressed as an ISO 8601 string.
It is important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
OrAllFilters -> (list)
Performs a logical
OR
operation on all filters that you specify.(structure)
Filters the search results based on document attributes or fields.
You can filter results using attributes for your particular documents. The attributes must exist in your index. For example, if your documents include the custom attribute "Department", you can filter documents that belong to the "HR" department. You would use the
EqualsTo
operation to filter results or documents with "Department" equals to "HR".You can use
AndAllFilters
andAndOrFilters
in combination with each other or with other operations such asEqualsTo
. For example:AndAllFilters
EqualsTo
: "Department", "HR"AndOrFilters
ContainsAny
: "Project Name", ["new hires", "new hiring"]This example filters results or documents that belong to the HR department and belong to projects that contain "new hires" or "new hiring" in the project name (must use
ContainAny
withStringListValue
). This example is filtering with a depth of 2.You cannot filter more than a depth of 2, otherwise you receive a
ValidationException
exception with the message "AttributeFilter cannot have a depth of more than 2." Also, if you use more than 10 attribute filters in a given list forAndAllFilters
orOrAllFilters
, you receive aValidationException
with the message "AttributeFilter cannot have a length of more than 10".For examples of using
AttributeFilter
, see Using document attributes to filter search results .AndAllFilters -> (list)
Performs a logical
AND
operation on all filters that you specify.( ... recursive ... )
OrAllFilters -> (list)
Performs a logical
OR
operation on all filters that you specify.( ... recursive ... )
( ... recursive ... )EqualsTo -> (structure)
Performs an equals operation on document attributes/fields and their values.
Key -> (string)
The identifier for the attribute.Value -> (structure)
The value of the attribute.
StringValue -> (string)
A string, such as "department".StringListValue -> (list)
A list of strings. The default maximum length or number of strings is 10.
(string)
LongValue -> (long)
A long integer value.DateValue -> (timestamp)
A date expressed as an ISO 8601 string.
It is important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
ContainsAll -> (structure)
Returns true when a document contains all of the specified document attributes/fields. This filter is only applicable to StringListValue .
Key -> (string)
The identifier for the attribute.Value -> (structure)
The value of the attribute.
StringValue -> (string)
A string, such as "department".StringListValue -> (list)
A list of strings. The default maximum length or number of strings is 10.
(string)
LongValue -> (long)
A long integer value.DateValue -> (timestamp)
A date expressed as an ISO 8601 string.
It is important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
ContainsAny -> (structure)
Returns true when a document contains any of the specified document attributes/fields. This filter is only applicable to StringListValue .
Key -> (string)
The identifier for the attribute.Value -> (structure)
The value of the attribute.
StringValue -> (string)
A string, such as "department".StringListValue -> (list)
A list of strings. The default maximum length or number of strings is 10.
(string)
LongValue -> (long)
A long integer value.DateValue -> (timestamp)
A date expressed as an ISO 8601 string.
It is important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
GreaterThan -> (structure)
Performs a greater than operation on document attributes/fields and their values. Use with the document attribute type
Date
orLong
.Key -> (string)
The identifier for the attribute.Value -> (structure)
The value of the attribute.
StringValue -> (string)
A string, such as "department".StringListValue -> (list)
A list of strings. The default maximum length or number of strings is 10.
(string)
LongValue -> (long)
A long integer value.DateValue -> (timestamp)
A date expressed as an ISO 8601 string.
It is important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
GreaterThanOrEquals -> (structure)
Performs a greater or equals than operation on document attributes/fields and their values. Use with the document attribute type
Date
orLong
.Key -> (string)
The identifier for the attribute.Value -> (structure)
The value of the attribute.
StringValue -> (string)
A string, such as "department".StringListValue -> (list)
A list of strings. The default maximum length or number of strings is 10.
(string)
LongValue -> (long)
A long integer value.DateValue -> (timestamp)
A date expressed as an ISO 8601 string.
It is important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
LessThan -> (structure)
Performs a less than operation on document attributes/fields and their values. Use with the document attribute type
Date
orLong
.Key -> (string)
The identifier for the attribute.Value -> (structure)
The value of the attribute.
StringValue -> (string)
A string, such as "department".StringListValue -> (list)
A list of strings. The default maximum length or number of strings is 10.
(string)
LongValue -> (long)
A long integer value.DateValue -> (timestamp)
A date expressed as an ISO 8601 string.
It is important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
LessThanOrEquals -> (structure)
Performs a less than or equals operation on document attributes/fields and their values. Use with the document attribute type
Date
orLong
.Key -> (string)
The identifier for the attribute.Value -> (structure)
The value of the attribute.
StringValue -> (string)
A string, such as "department".StringListValue -> (list)
A list of strings. The default maximum length or number of strings is 10.
(string)
LongValue -> (long)
A long integer value.DateValue -> (timestamp)
A date expressed as an ISO 8601 string.
It is important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
NotFilter -> (structure)
Performs a logical
NOT
operation on all filters that you specify.AndAllFilters -> (list)
Performs a logical
AND
operation on all filters that you specify.( ... recursive ... )
OrAllFilters -> (list)
Performs a logical
OR
operation on all filters that you specify.( ... recursive ... )
( ... recursive ... )EqualsTo -> (structure)
Performs an equals operation on document attributes/fields and their values.
Key -> (string)
The identifier for the attribute.Value -> (structure)
The value of the attribute.
StringValue -> (string)
A string, such as "department".StringListValue -> (list)
A list of strings. The default maximum length or number of strings is 10.
(string)
LongValue -> (long)
A long integer value.DateValue -> (timestamp)
A date expressed as an ISO 8601 string.
It is important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
ContainsAll -> (structure)
Returns true when a document contains all of the specified document attributes/fields. This filter is only applicable to StringListValue .
Key -> (string)
The identifier for the attribute.Value -> (structure)
The value of the attribute.
StringValue -> (string)
A string, such as "department".StringListValue -> (list)
A list of strings. The default maximum length or number of strings is 10.
(string)
LongValue -> (long)
A long integer value.DateValue -> (timestamp)
A date expressed as an ISO 8601 string.
It is important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
ContainsAny -> (structure)
Returns true when a document contains any of the specified document attributes/fields. This filter is only applicable to StringListValue .
Key -> (string)
The identifier for the attribute.Value -> (structure)
The value of the attribute.
StringValue -> (string)
A string, such as "department".StringListValue -> (list)
A list of strings. The default maximum length or number of strings is 10.
(string)
LongValue -> (long)
A long integer value.DateValue -> (timestamp)
A date expressed as an ISO 8601 string.
It is important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
GreaterThan -> (structure)
Performs a greater than operation on document attributes/fields and their values. Use with the document attribute type
Date
orLong
.Key -> (string)
The identifier for the attribute.Value -> (structure)
The value of the attribute.
StringValue -> (string)
A string, such as "department".StringListValue -> (list)
A list of strings. The default maximum length or number of strings is 10.
(string)
LongValue -> (long)
A long integer value.DateValue -> (timestamp)
A date expressed as an ISO 8601 string.
It is important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
GreaterThanOrEquals -> (structure)
Performs a greater or equals than operation on document attributes/fields and their values. Use with the document attribute type
Date
orLong
.Key -> (string)
The identifier for the attribute.Value -> (structure)
The value of the attribute.
StringValue -> (string)
A string, such as "department".StringListValue -> (list)
A list of strings. The default maximum length or number of strings is 10.
(string)
LongValue -> (long)
A long integer value.DateValue -> (timestamp)
A date expressed as an ISO 8601 string.
It is important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
LessThan -> (structure)
Performs a less than operation on document attributes/fields and their values. Use with the document attribute type
Date
orLong
.Key -> (string)
The identifier for the attribute.Value -> (structure)
The value of the attribute.
StringValue -> (string)
A string, such as "department".StringListValue -> (list)
A list of strings. The default maximum length or number of strings is 10.
(string)
LongValue -> (long)
A long integer value.DateValue -> (timestamp)
A date expressed as an ISO 8601 string.
It is important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
LessThanOrEquals -> (structure)
Performs a less than or equals operation on document attributes/fields and their values. Use with the document attribute type
Date
orLong
.Key -> (string)
The identifier for the attribute.Value -> (structure)
The value of the attribute.
StringValue -> (string)
A string, such as "department".StringListValue -> (list)
A list of strings. The default maximum length or number of strings is 10.
(string)
LongValue -> (long)
A long integer value.DateValue -> (timestamp)
A date expressed as an ISO 8601 string.
It is important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
EqualsTo -> (structure)
Performs an equals operation on document attributes/fields and their values.
Key -> (string)
The identifier for the attribute.Value -> (structure)
The value of the attribute.
StringValue -> (string)
A string, such as "department".StringListValue -> (list)
A list of strings. The default maximum length or number of strings is 10.
(string)
LongValue -> (long)
A long integer value.DateValue -> (timestamp)
A date expressed as an ISO 8601 string.
It is important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
ContainsAll -> (structure)
Returns true when a document contains all of the specified document attributes/fields. This filter is only applicable to StringListValue .
Key -> (string)
The identifier for the attribute.Value -> (structure)
The value of the attribute.
StringValue -> (string)
A string, such as "department".StringListValue -> (list)
A list of strings. The default maximum length or number of strings is 10.
(string)
LongValue -> (long)
A long integer value.DateValue -> (timestamp)
A date expressed as an ISO 8601 string.
It is important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
ContainsAny -> (structure)
Returns true when a document contains any of the specified document attributes/fields. This filter is only applicable to StringListValue .
Key -> (string)
The identifier for the attribute.Value -> (structure)
The value of the attribute.
StringValue -> (string)
A string, such as "department".StringListValue -> (list)
A list of strings. The default maximum length or number of strings is 10.
(string)
LongValue -> (long)
A long integer value.DateValue -> (timestamp)
A date expressed as an ISO 8601 string.
It is important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
GreaterThan -> (structure)
Performs a greater than operation on document attributes/fields and their values. Use with the document attribute type
Date
orLong
.Key -> (string)
The identifier for the attribute.Value -> (structure)
The value of the attribute.
StringValue -> (string)
A string, such as "department".StringListValue -> (list)
A list of strings. The default maximum length or number of strings is 10.
(string)
LongValue -> (long)
A long integer value.DateValue -> (timestamp)
A date expressed as an ISO 8601 string.
It is important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
GreaterThanOrEquals -> (structure)
Performs a greater or equals than operation on document attributes/fields and their values. Use with the document attribute type
Date
orLong
.Key -> (string)
The identifier for the attribute.Value -> (structure)
The value of the attribute.
StringValue -> (string)
A string, such as "department".StringListValue -> (list)
A list of strings. The default maximum length or number of strings is 10.
(string)
LongValue -> (long)
A long integer value.DateValue -> (timestamp)
A date expressed as an ISO 8601 string.
It is important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
LessThan -> (structure)
Performs a less than operation on document attributes/fields and their values. Use with the document attribute type
Date
orLong
.Key -> (string)
The identifier for the attribute.Value -> (structure)
The value of the attribute.
StringValue -> (string)
A string, such as "department".StringListValue -> (list)
A list of strings. The default maximum length or number of strings is 10.
(string)
LongValue -> (long)
A long integer value.DateValue -> (timestamp)
A date expressed as an ISO 8601 string.
It is important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
LessThanOrEquals -> (structure)
Performs a less than or equals operation on document attributes/fields and their values. Use with the document attribute type
Date
orLong
.Key -> (string)
The identifier for the attribute.Value -> (structure)
The value of the attribute.
StringValue -> (string)
A string, such as "department".StringListValue -> (list)
A list of strings. The default maximum length or number of strings is 10.
(string)
LongValue -> (long)
A long integer value.DateValue -> (timestamp)
A date expressed as an ISO 8601 string.
It is important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
JSON Syntax:
{
"AndAllFilters": [
{
"AndAllFilters": [
{ ... recursive ... }
...
],
"OrAllFilters": [
{ ... recursive ... }
...
],
"NotFilter": { ... recursive ... },
"EqualsTo": {
"Key": "string",
"Value": {
"StringValue": "string",
"StringListValue": ["string", ...],
"LongValue": long,
"DateValue": timestamp
}
},
"ContainsAll": {
"Key": "string",
"Value": {
"StringValue": "string",
"StringListValue": ["string", ...],
"LongValue": long,
"DateValue": timestamp
}
},
"ContainsAny": {
"Key": "string",
"Value": {
"StringValue": "string",
"StringListValue": ["string", ...],
"LongValue": long,
"DateValue": timestamp
}
},
"GreaterThan": {
"Key": "string",
"Value": {
"StringValue": "string",
"StringListValue": ["string", ...],
"LongValue": long,
"DateValue": timestamp
}
},
"GreaterThanOrEquals": {
"Key": "string",
"Value": {
"StringValue": "string",
"StringListValue": ["string", ...],
"LongValue": long,
"DateValue": timestamp
}
},
"LessThan": {
"Key": "string",
"Value": {
"StringValue": "string",
"StringListValue": ["string", ...],
"LongValue": long,
"DateValue": timestamp
}
},
"LessThanOrEquals": {
"Key": "string",
"Value": {
"StringValue": "string",
"StringListValue": ["string", ...],
"LongValue": long,
"DateValue": timestamp
}
}
}
...
],
"OrAllFilters": [
{
"AndAllFilters": [
{ ... recursive ... }
...
],
"OrAllFilters": [
{ ... recursive ... }
...
],
"NotFilter": { ... recursive ... },
"EqualsTo": {
"Key": "string",
"Value": {
"StringValue": "string",
"StringListValue": ["string", ...],
"LongValue": long,
"DateValue": timestamp
}
},
"ContainsAll": {
"Key": "string",
"Value": {
"StringValue": "string",
"StringListValue": ["string", ...],
"LongValue": long,
"DateValue": timestamp
}
},
"ContainsAny": {
"Key": "string",
"Value": {
"StringValue": "string",
"StringListValue": ["string", ...],
"LongValue": long,
"DateValue": timestamp
}
},
"GreaterThan": {
"Key": "string",
"Value": {
"StringValue": "string",
"StringListValue": ["string", ...],
"LongValue": long,
"DateValue": timestamp
}
},
"GreaterThanOrEquals": {
"Key": "string",
"Value": {
"StringValue": "string",
"StringListValue": ["string", ...],
"LongValue": long,
"DateValue": timestamp
}
},
"LessThan": {
"Key": "string",
"Value": {
"StringValue": "string",
"StringListValue": ["string", ...],
"LongValue": long,
"DateValue": timestamp
}
},
"LessThanOrEquals": {
"Key": "string",
"Value": {
"StringValue": "string",
"StringListValue": ["string", ...],
"LongValue": long,
"DateValue": timestamp
}
}
}
...
],
"NotFilter": {
"AndAllFilters": [
{ ... recursive ... }
...
],
"OrAllFilters": [
{ ... recursive ... }
...
],
"NotFilter": { ... recursive ... },
"EqualsTo": {
"Key": "string",
"Value": {
"StringValue": "string",
"StringListValue": ["string", ...],
"LongValue": long,
"DateValue": timestamp
}
},
"ContainsAll": {
"Key": "string",
"Value": {
"StringValue": "string",
"StringListValue": ["string", ...],
"LongValue": long,
"DateValue": timestamp
}
},
"ContainsAny": {
"Key": "string",
"Value": {
"StringValue": "string",
"StringListValue": ["string", ...],
"LongValue": long,
"DateValue": timestamp
}
},
"GreaterThan": {
"Key": "string",
"Value": {
"StringValue": "string",
"StringListValue": ["string", ...],
"LongValue": long,
"DateValue": timestamp
}
},
"GreaterThanOrEquals": {
"Key": "string",
"Value": {
"StringValue": "string",
"StringListValue": ["string", ...],
"LongValue": long,
"DateValue": timestamp
}
},
"LessThan": {
"Key": "string",
"Value": {
"StringValue": "string",
"StringListValue": ["string", ...],
"LongValue": long,
"DateValue": timestamp
}
},
"LessThanOrEquals": {
"Key": "string",
"Value": {
"StringValue": "string",
"StringListValue": ["string", ...],
"LongValue": long,
"DateValue": timestamp
}
}
},
"EqualsTo": {
"Key": "string",
"Value": {
"StringValue": "string",
"StringListValue": ["string", ...],
"LongValue": long,
"DateValue": timestamp
}
},
"ContainsAll": {
"Key": "string",
"Value": {
"StringValue": "string",
"StringListValue": ["string", ...],
"LongValue": long,
"DateValue": timestamp
}
},
"ContainsAny": {
"Key": "string",
"Value": {
"StringValue": "string",
"StringListValue": ["string", ...],
"LongValue": long,
"DateValue": timestamp
}
},
"GreaterThan": {
"Key": "string",
"Value": {
"StringValue": "string",
"StringListValue": ["string", ...],
"LongValue": long,
"DateValue": timestamp
}
},
"GreaterThanOrEquals": {
"Key": "string",
"Value": {
"StringValue": "string",
"StringListValue": ["string", ...],
"LongValue": long,
"DateValue": timestamp
}
},
"LessThan": {
"Key": "string",
"Value": {
"StringValue": "string",
"StringListValue": ["string", ...],
"LongValue": long,
"DateValue": timestamp
}
},
"LessThanOrEquals": {
"Key": "string",
"Value": {
"StringValue": "string",
"StringListValue": ["string", ...],
"LongValue": long,
"DateValue": timestamp
}
}
}
--requested-document-attributes
(list)
A list of document fields/attributes to include in the response. You can limit the response to include certain document fields. By default, all document fields are included in the response.
(string)
Syntax:
"string" "string" ...
--document-relevance-override-configurations
(list)
Overrides relevance tuning configurations of fields/attributes set at the index level.
If you use this API to override the relevance tuning configured at the index level, but there is no relevance tuning configured at the index level, then Amazon Kendra does not apply any relevance tuning.
If there is relevance tuning configured for fields at the index level, and you use this API to override only some of these fields, then for the fields you did not override, the importance is set to 1.
(structure)
Overrides the document relevance properties of a custom index field.
Name -> (string)
The name of the index field.Relevance -> (structure)
Provides information for tuning the relevance of a field in a search. When a query includes terms that match the field, the results are given a boost in the response based on these tuning parameters.
Freshness -> (boolean)
Indicates that this field determines how "fresh" a document is. For example, if document 1 was created on November 5, and document 2 was created on October 31, document 1 is "fresher" than document 2. Only applies toDATE
fields.Importance -> (integer)
The relative importance of the field in the search. Larger numbers provide more of a boost than smaller numbers.Duration -> (string)
Specifies the time period that the boost applies to. For example, to make the boost apply to documents with the field value within the last month, you would use "2628000s". Once the field value is beyond the specified range, the effect of the boost drops off. The higher the importance, the faster the effect drops off. If you don't specify a value, the default is 3 months. The value of the field is a numeric string followed by the character "s", for example "86400s" for one day, or "604800s" for one week.
Only applies to
DATE
fields.RankOrder -> (string)
Determines how values should be interpreted.
When the
RankOrder
field isASCENDING
, higher numbers are better. For example, a document with a rating score of 10 is higher ranking than a document with a rating score of 1.When the
RankOrder
field isDESCENDING
, lower numbers are better. For example, in a task tracking application, a priority 1 task is more important than a priority 5 task.Only applies to
LONG
fields.ValueImportanceMap -> (map)
A list of values that should be given a different boost when they appear in the result list. For example, if you are boosting a field called "department", query terms that match the department field are boosted in the result. However, you can add entries from the department field to boost documents with those values higher.
For example, you can add entries to the map with names of departments. If you add "HR",5 and "Legal",3 those departments are given special attention when they appear in the metadata of a document. When those terms appear they are given the specified importance instead of the regular importance for the boost.
key -> (string)
value -> (integer)
Shorthand Syntax:
Name=string,Relevance={Freshness=boolean,Importance=integer,Duration=string,RankOrder=string,ValueImportanceMap={KeyName1=integer,KeyName2=integer}} ...
JSON Syntax:
[
{
"Name": "string",
"Relevance": {
"Freshness": true|false,
"Importance": integer,
"Duration": "string",
"RankOrder": "ASCENDING"|"DESCENDING",
"ValueImportanceMap": {"string": integer
...}
}
}
...
]
--page-number
(integer)
Retrieved relevant passages are returned in pages the size of thePageSize
parameter. By default, Amazon Kendra returns the first page of results. Use this parameter to get result pages after the first one.
--page-size
(integer)
Sets the number of retrieved relevant passages that are returned in each page of results. The default page size is 10. The maximum number of results returned is 100. If you ask for more than 100 results, only 100 are returned.
--user-context
(structure)
The user context token or user and group information.
Token -> (string)
The user context token for filtering search results for a user. It must be a JWT or a JSON token.UserId -> (string)
The identifier of the user you want to filter search results based on their access to documents.Groups -> (list)
The list of groups you want to filter search results based on the groups' access to documents.
(string)
DataSourceGroups -> (list)
The list of data source groups you want to filter search results based on groups' access to documents in that data source.
(structure)
Data source information for user context filtering.
GroupId -> (string)
The identifier of the group you want to add to your list of groups. This is for filtering search results based on the groups' access to documents.DataSourceId -> (string)
The identifier of the data source group you want to add to your list of data source groups. This is for filtering search results based on the groups' access to documents in that data source.
Shorthand Syntax:
Token=string,UserId=string,Groups=string,string,DataSourceGroups=[{GroupId=string,DataSourceId=string},{GroupId=string,DataSourceId=string}]
JSON Syntax:
{
"Token": "string",
"UserId": "string",
"Groups": ["string", ...],
"DataSourceGroups": [
{
"GroupId": "string",
"DataSourceId": "string"
}
...
]
}
--cli-input-json
(string)
Performs service operation based on the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton
. If other arguments are provided on the command line, the CLI values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally.
--generate-cli-skeleton
(string)
Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input
, prints a sample input JSON that can be used as an argument for --cli-input-json
. If provided with the value output
, it validates the command inputs and returns a sample output JSON for that command.
--debug
(boolean)
Turn on debug logging.
--endpoint-url
(string)
Override command's default URL with the given URL.
--no-verify-ssl
(boolean)
By default, the AWS CLI uses SSL when communicating with AWS services. For each SSL connection, the AWS CLI will verify SSL certificates. This option overrides the default behavior of verifying SSL certificates.
--no-paginate
(boolean)
Disable automatic pagination. If automatic pagination is disabled, the AWS CLI will only make one call, for the first page of results.
--output
(string)
The formatting style for command output.
--query
(string)
A JMESPath query to use in filtering the response data.
--profile
(string)
Use a specific profile from your credential file.
--region
(string)
The region to use. Overrides config/env settings.
--version
(string)
Display the version of this tool.
--color
(string)
Turn on/off color output.
--no-sign-request
(boolean)
Do not sign requests. Credentials will not be loaded if this argument is provided.
--ca-bundle
(string)
The CA certificate bundle to use when verifying SSL certificates. Overrides config/env settings.
--cli-read-timeout
(int)
The maximum socket read time in seconds. If the value is set to 0, the socket read will be blocking and not timeout. The default value is 60 seconds.
--cli-connect-timeout
(int)
The maximum socket connect time in seconds. If the value is set to 0, the socket connect will be blocking and not timeout. The default value is 60 seconds.
QueryId -> (string)
The identifier of query used for the search. You also useQueryId
to identify the search when using the Submitfeedback API.
ResultItems -> (list)
The results of the retrieved relevant passages for the search.
(structure)
A single retrieved relevant passage result.
Id -> (string)
The identifier of the relevant passage result.DocumentId -> (string)
The identifier of the document.DocumentTitle -> (string)
The title of the document.Content -> (string)
The contents of the relevant passage.DocumentURI -> (string)
The URI of the original location of the document.DocumentAttributes -> (list)
An array of document fields/attributes assigned to a document in the search results. For example, the document author (
_author
) or the source URI (_source_uri
) of the document.(structure)
A document attribute or metadata field. To create custom document attributes, see Custom attributes .
Key -> (string)
The identifier for the attribute.Value -> (structure)
The value of the attribute.
StringValue -> (string)
A string, such as "department".StringListValue -> (list)
A list of strings. The default maximum length or number of strings is 10.
(string)
LongValue -> (long)
A long integer value.DateValue -> (timestamp)
A date expressed as an ISO 8601 string.
It is important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
ScoreAttributes -> (structure)
The confidence score bucket for a retrieved passage result. The confidence bucket provides a relative ranking that indicates how confident Amazon Kendra is that the response is relevant to the query.
ScoreConfidence -> (string)
A relative ranking for how relevant the response is to the query.