# Passing null into After(afterKey) with Composite aggregation

**URL:** <https://discuss.elastic.co/t/passing-null-into-after-afterkey-with-composite-aggregation/175022>\
**Category:** Elasticsearch\
**Created:** [April 2, 2019, 2:46pm UTC](https://discuss.elastic.co/t/passing-null-into-after-afterkey-with-composite-aggregation/175022 "2019-04-02T14:46:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![andrei-galkin](https://avatars.discourse-cdn.com/v4/letter/a/ed655f/32.png) [@andrei-galkin](https://discuss.elastic.co/u/andrei-galkin)\
**Post date:** [April 2, 2019, 2:46pm UTC](https://discuss.elastic.co/t/passing-null-into-after-afterkey-with-composite-aggregation/175022/1 "2019-04-02T14:46:01Z")

</div>

NEST 6.6 .  
Is the code equal

```
 var r = new AggregationContainerDescriptor<DormantAccountEntry>();
                r.Composite(compositeName,
                            co => co
                                  .Sources(so => so.Terms("OrgId", t => t.Field(_authAlias + "OrgId")))
                                  .Aggregations(fm => fm.Max("ActDate", md => md.Field(_authAlias + "ActDate"))));

```

equal to ?

```
var r = new AggregationContainerDescriptor<DormantAccountEntry>();
                   r.Composite(compositeName,
                                co => co
                                      .Sources(so => so.Terms("OrgId", t => t.Field(_authAlias + "OrgId")))
                                      .Aggregations(fm => fm.Max("ActDate", md => md.Field(_authAlias + "ActDate")))
.After(null));

```

I mean when I pass null to After function to the code without After function ?  
Thanks for the support.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 30, 2019, 2:46pm UTC](https://discuss.elastic.co/t/passing-null-into-after-afterkey-with-composite-aggregation/175022/2 "2019-04-30T14:46:10Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
