Skip to content
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

Improve performance for large scale MongoDB database #1037

Merged
merged 4 commits into from
Dec 19, 2023
Merged
Show file tree
Hide file tree
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
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@

All changes that impact users of this module are documented in this file, in the [Common Changelog](https://common-changelog.org) format with some additional specifications defined in the CONTRIBUTING file. This codebase adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased
## Unreleased [patch]

_Full changeset and discussions: [#1037](https://github.com/OpenTermsArchive/engine/pull/1037)._

> Development of this release was made on a volunteer basis by [@Ndpnt](http://github.com/ndpnt).

### Fixed

- Improve performance for large-scale MongoDB databases

## 0.34.0 - 2023-12-11

Expand Down
2 changes: 2 additions & 0 deletions src/archivist/recorder/repositories/mongo/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ export default class MongoRepository extends RepositoryInterface {

this.collection = db.collection(this.collectionName);

this.collection.createIndex({ serviceId: 1, termsType: 1, fetchDate: -1 });

return this;
}

Expand Down
Loading