Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Aggregates on indexed data with search queries pertaining to particular fields.
Requires permission to access the GetBucketsAggregation action.
Synopsis
- data GetBucketsAggregation = GetBucketsAggregation' {}
- newGetBucketsAggregation :: Text -> Text -> BucketsAggregationType -> GetBucketsAggregation
- getBucketsAggregation_queryVersion :: Lens' GetBucketsAggregation (Maybe Text)
- getBucketsAggregation_indexName :: Lens' GetBucketsAggregation (Maybe Text)
- getBucketsAggregation_queryString :: Lens' GetBucketsAggregation Text
- getBucketsAggregation_aggregationField :: Lens' GetBucketsAggregation Text
- getBucketsAggregation_bucketsAggregationType :: Lens' GetBucketsAggregation BucketsAggregationType
- data GetBucketsAggregationResponse = GetBucketsAggregationResponse' {
- buckets :: Maybe [Bucket]
- totalCount :: Maybe Int
- httpStatus :: Int
- newGetBucketsAggregationResponse :: Int -> GetBucketsAggregationResponse
- getBucketsAggregationResponse_buckets :: Lens' GetBucketsAggregationResponse (Maybe [Bucket])
- getBucketsAggregationResponse_totalCount :: Lens' GetBucketsAggregationResponse (Maybe Int)
- getBucketsAggregationResponse_httpStatus :: Lens' GetBucketsAggregationResponse Int
Creating a Request
data GetBucketsAggregation Source #
See: newGetBucketsAggregation
smart constructor.
GetBucketsAggregation' | |
|
Instances
newGetBucketsAggregation Source #
Create a value of GetBucketsAggregation
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:queryVersion:GetBucketsAggregation'
, getBucketsAggregation_queryVersion
- The version of the query.
$sel:indexName:GetBucketsAggregation'
, getBucketsAggregation_indexName
- The name of the index to search.
$sel:queryString:GetBucketsAggregation'
, getBucketsAggregation_queryString
- The search query string.
$sel:aggregationField:GetBucketsAggregation'
, getBucketsAggregation_aggregationField
- The aggregation field.
$sel:bucketsAggregationType:GetBucketsAggregation'
, getBucketsAggregation_bucketsAggregationType
- The basic control of the response shape and the bucket aggregation type
to perform.
Request Lenses
getBucketsAggregation_queryVersion :: Lens' GetBucketsAggregation (Maybe Text) Source #
The version of the query.
getBucketsAggregation_indexName :: Lens' GetBucketsAggregation (Maybe Text) Source #
The name of the index to search.
getBucketsAggregation_queryString :: Lens' GetBucketsAggregation Text Source #
The search query string.
getBucketsAggregation_aggregationField :: Lens' GetBucketsAggregation Text Source #
The aggregation field.
getBucketsAggregation_bucketsAggregationType :: Lens' GetBucketsAggregation BucketsAggregationType Source #
The basic control of the response shape and the bucket aggregation type to perform.
Destructuring the Response
data GetBucketsAggregationResponse Source #
See: newGetBucketsAggregationResponse
smart constructor.
GetBucketsAggregationResponse' | |
|
Instances
newGetBucketsAggregationResponse Source #
Create a value of GetBucketsAggregationResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:buckets:GetBucketsAggregationResponse'
, getBucketsAggregationResponse_buckets
- The main part of the response with a list of buckets. Each bucket
contains a keyValue
and a count
.
keyValue
: The aggregation field value counted for the particular
bucket.
count
: The number of documents that have that value.
$sel:totalCount:GetBucketsAggregationResponse'
, getBucketsAggregationResponse_totalCount
- The total number of documents that fit the query string criteria and
contain a value for the Aggregation field targeted in the request.
$sel:httpStatus:GetBucketsAggregationResponse'
, getBucketsAggregationResponse_httpStatus
- The response's http status code.
Response Lenses
getBucketsAggregationResponse_buckets :: Lens' GetBucketsAggregationResponse (Maybe [Bucket]) Source #
The main part of the response with a list of buckets. Each bucket
contains a keyValue
and a count
.
keyValue
: The aggregation field value counted for the particular
bucket.
count
: The number of documents that have that value.
getBucketsAggregationResponse_totalCount :: Lens' GetBucketsAggregationResponse (Maybe Int) Source #
The total number of documents that fit the query string criteria and contain a value for the Aggregation field targeted in the request.
getBucketsAggregationResponse_httpStatus :: Lens' GetBucketsAggregationResponse Int Source #
The response's http status code.