Skip to content

Sort should be before not after group #5614

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 25, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions source/includes/note-group-and-window-behavior.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
To define the document order for |method| with the:

- :pipeline:`$group` stage, add a :pipeline:`$sort` stage after the
- :pipeline:`$group` stage, add a :pipeline:`$sort` stage before the
:pipeline:`$group` stage.

- :pipeline:`$setWindowFields` stage, set the :ref:`sortBy
Expand All @@ -17,4 +17,4 @@ When used with :pipeline:`$setWindowFields`, |method| returns ``null``
for empty :ref:`windows <setWindowFields-window>`. An example empty
window is a ``{ documents: [ -1, -1 ] }`` :ref:`documents
<setWindowFields-documents>` window on the first document of a
:ref:`partition <setWindowFields-partitionBy>`.
:ref:`partition <setWindowFields-partitionBy>`.