Skip to content

Commit

Permalink
Ensure sort stage is after match in agg pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
munrojm committed Nov 7, 2023
1 parent f94e376 commit 430512a
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/maggma/api/resource/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ def generate_query_pipeline(query: dict, store: Store):
projection_dict.update({p: 1 for p in query["properties"]})

if sorting:
pipeline.append({"$project": {**projection_dict, store.key: 1}})
pipeline.append(sort_dict)

pipeline.append({"$project": projection_dict})
Expand Down

0 comments on commit 430512a

Please sign in to comment.