Interface QueryResponse.Builder
-
- All Superinterfaces:
AwsResponse.Builder,Buildable,CopyableBuilder<QueryResponse.Builder,QueryResponse>,KendraResponse.Builder,SdkBuilder<QueryResponse.Builder,QueryResponse>,SdkPojo,SdkResponse.Builder
- Enclosing class:
- QueryResponse
public static interface QueryResponse.Builder extends KendraResponse.Builder, SdkPojo, CopyableBuilder<QueryResponse.Builder,QueryResponse>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description QueryResponse.BuilderfacetResults(Collection<FacetResult> facetResults)Contains the facet results.QueryResponse.BuilderfacetResults(Consumer<FacetResult.Builder>... facetResults)Contains the facet results.QueryResponse.BuilderfacetResults(FacetResult... facetResults)Contains the facet results.QueryResponse.BuilderfeaturedResultsItems(Collection<FeaturedResultsItem> featuredResultsItems)The list of featured result items.QueryResponse.BuilderfeaturedResultsItems(Consumer<FeaturedResultsItem.Builder>... featuredResultsItems)The list of featured result items.QueryResponse.BuilderfeaturedResultsItems(FeaturedResultsItem... featuredResultsItems)The list of featured result items.QueryResponse.BuilderqueryId(String queryId)The identifier for the search.QueryResponse.BuilderresultItems(Collection<QueryResultItem> resultItems)The results of the search.QueryResponse.BuilderresultItems(Consumer<QueryResultItem.Builder>... resultItems)The results of the search.QueryResponse.BuilderresultItems(QueryResultItem... resultItems)The results of the search.QueryResponse.BuilderspellCorrectedQueries(Collection<SpellCorrectedQuery> spellCorrectedQueries)A list of information related to suggested spell corrections for a query.QueryResponse.BuilderspellCorrectedQueries(Consumer<SpellCorrectedQuery.Builder>... spellCorrectedQueries)A list of information related to suggested spell corrections for a query.QueryResponse.BuilderspellCorrectedQueries(SpellCorrectedQuery... spellCorrectedQueries)A list of information related to suggested spell corrections for a query.QueryResponse.BuildertotalNumberOfResults(Integer totalNumberOfResults)The total number of items found by the search.QueryResponse.Builderwarnings(Collection<Warning> warnings)A list of warning codes and their messages on problems with your query.QueryResponse.Builderwarnings(Consumer<Warning.Builder>... warnings)A list of warning codes and their messages on problems with your query.QueryResponse.Builderwarnings(Warning... warnings)A list of warning codes and their messages on problems with your query.-
Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
-
Methods inherited from interface software.amazon.awssdk.services.kendra.model.KendraResponse.Builder
build, responseMetadata, responseMetadata
-
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
-
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFields
-
Methods inherited from interface software.amazon.awssdk.core.SdkResponse.Builder
sdkHttpResponse, sdkHttpResponse
-
-
-
-
Method Detail
-
queryId
QueryResponse.Builder queryId(String queryId)
The identifier for the search. You also use
QueryIdto identify the search when using the SubmitFeedback API.- Parameters:
queryId- The identifier for the search. You also useQueryIdto identify the search when using the SubmitFeedback API.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
resultItems
QueryResponse.Builder resultItems(Collection<QueryResultItem> resultItems)
The results of the search.
- Parameters:
resultItems- The results of the search.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
resultItems
QueryResponse.Builder resultItems(QueryResultItem... resultItems)
The results of the search.
- Parameters:
resultItems- The results of the search.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
resultItems
QueryResponse.Builder resultItems(Consumer<QueryResultItem.Builder>... resultItems)
The results of the search.
This is a convenience method that creates an instance of theQueryResultItem.Builderavoiding the need to create one manually viaQueryResultItem.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed to#resultItems(List.) - Parameters:
resultItems- a consumer that will call methods onQueryResultItem.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
#resultItems(java.util.Collection)
-
facetResults
QueryResponse.Builder facetResults(Collection<FacetResult> facetResults)
Contains the facet results. A
FacetResultcontains the counts for each field/attribute key that was specified in theFacetsinput parameter.- Parameters:
facetResults- Contains the facet results. AFacetResultcontains the counts for each field/attribute key that was specified in theFacetsinput parameter.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
facetResults
QueryResponse.Builder facetResults(FacetResult... facetResults)
Contains the facet results. A
FacetResultcontains the counts for each field/attribute key that was specified in theFacetsinput parameter.- Parameters:
facetResults- Contains the facet results. AFacetResultcontains the counts for each field/attribute key that was specified in theFacetsinput parameter.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
facetResults
QueryResponse.Builder facetResults(Consumer<FacetResult.Builder>... facetResults)
Contains the facet results. A
This is a convenience method that creates an instance of theFacetResultcontains the counts for each field/attribute key that was specified in theFacetsinput parameter.FacetResult.Builderavoiding the need to create one manually viaFacetResult.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed to#facetResults(List.) - Parameters:
facetResults- a consumer that will call methods onFacetResult.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
#facetResults(java.util.Collection)
-
totalNumberOfResults
QueryResponse.Builder totalNumberOfResults(Integer totalNumberOfResults)
The total number of items found by the search. However, you can only retrieve up to 100 items. For example, if the search found 192 items, you can only retrieve the first 100 of the items.
- Parameters:
totalNumberOfResults- The total number of items found by the search. However, you can only retrieve up to 100 items. For example, if the search found 192 items, you can only retrieve the first 100 of the items.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
warnings
QueryResponse.Builder warnings(Collection<Warning> warnings)
A list of warning codes and their messages on problems with your query.
Amazon Kendra currently only supports one type of warning, which is a warning on invalid syntax used in the query. For examples of invalid query syntax, see Searching with advanced query syntax.
- Parameters:
warnings- A list of warning codes and their messages on problems with your query.Amazon Kendra currently only supports one type of warning, which is a warning on invalid syntax used in the query. For examples of invalid query syntax, see Searching with advanced query syntax.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
warnings
QueryResponse.Builder warnings(Warning... warnings)
A list of warning codes and their messages on problems with your query.
Amazon Kendra currently only supports one type of warning, which is a warning on invalid syntax used in the query. For examples of invalid query syntax, see Searching with advanced query syntax.
- Parameters:
warnings- A list of warning codes and their messages on problems with your query.Amazon Kendra currently only supports one type of warning, which is a warning on invalid syntax used in the query. For examples of invalid query syntax, see Searching with advanced query syntax.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
warnings
QueryResponse.Builder warnings(Consumer<Warning.Builder>... warnings)
A list of warning codes and their messages on problems with your query.
Amazon Kendra currently only supports one type of warning, which is a warning on invalid syntax used in the query. For examples of invalid query syntax, see Searching with advanced query syntax.
This is a convenience method that creates an instance of theWarning.Builderavoiding the need to create one manually viaWarning.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed to#warnings(List.) - Parameters:
warnings- a consumer that will call methods onWarning.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
#warnings(java.util.Collection)
-
spellCorrectedQueries
QueryResponse.Builder spellCorrectedQueries(Collection<SpellCorrectedQuery> spellCorrectedQueries)
A list of information related to suggested spell corrections for a query.
- Parameters:
spellCorrectedQueries- A list of information related to suggested spell corrections for a query.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
spellCorrectedQueries
QueryResponse.Builder spellCorrectedQueries(SpellCorrectedQuery... spellCorrectedQueries)
A list of information related to suggested spell corrections for a query.
- Parameters:
spellCorrectedQueries- A list of information related to suggested spell corrections for a query.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
spellCorrectedQueries
QueryResponse.Builder spellCorrectedQueries(Consumer<SpellCorrectedQuery.Builder>... spellCorrectedQueries)
A list of information related to suggested spell corrections for a query.
This is a convenience method that creates an instance of theSpellCorrectedQuery.Builderavoiding the need to create one manually viaSpellCorrectedQuery.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed to#spellCorrectedQueries(List.) - Parameters:
spellCorrectedQueries- a consumer that will call methods onSpellCorrectedQuery.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
#spellCorrectedQueries(java.util.Collection)
-
featuredResultsItems
QueryResponse.Builder featuredResultsItems(Collection<FeaturedResultsItem> featuredResultsItems)
The list of featured result items. Featured results are displayed at the top of the search results page, placed above all other results for certain queries. If there's an exact match of a query, then certain documents are featured in the search results.
- Parameters:
featuredResultsItems- The list of featured result items. Featured results are displayed at the top of the search results page, placed above all other results for certain queries. If there's an exact match of a query, then certain documents are featured in the search results.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
featuredResultsItems
QueryResponse.Builder featuredResultsItems(FeaturedResultsItem... featuredResultsItems)
The list of featured result items. Featured results are displayed at the top of the search results page, placed above all other results for certain queries. If there's an exact match of a query, then certain documents are featured in the search results.
- Parameters:
featuredResultsItems- The list of featured result items. Featured results are displayed at the top of the search results page, placed above all other results for certain queries. If there's an exact match of a query, then certain documents are featured in the search results.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
featuredResultsItems
QueryResponse.Builder featuredResultsItems(Consumer<FeaturedResultsItem.Builder>... featuredResultsItems)
The list of featured result items. Featured results are displayed at the top of the search results page, placed above all other results for certain queries. If there's an exact match of a query, then certain documents are featured in the search results.
This is a convenience method that creates an instance of theFeaturedResultsItem.Builderavoiding the need to create one manually viaFeaturedResultsItem.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed to#featuredResultsItems(List.) - Parameters:
featuredResultsItems- a consumer that will call methods onFeaturedResultsItem.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
#featuredResultsItems(java.util.Collection)
-
-