Skip to content

Commit

Permalink
Merge pull request #198 from ngageoint/location_index
Browse files Browse the repository at this point in the history
Add location collection index for exports
  • Loading branch information
restjohn authored Mar 7, 2024
2 parents 09c0b79 + 5ab1c97 commit c7bbcfe
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions service/src/models/location.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ LocationSchema.index({ 'properties.timestamp': 1, _id: 1 });
LocationSchema.index({ 'userId': 1 });
// TODO: should add _id to the end of the index for consistent ordering
LocationSchema.index({ 'properties.user': 1, 'properties.timestamp': 1 });
LocationSchema.index({ eventId: 1, userId: 1, 'properties.timestamp': 1, _id: 1 }, { background: true });

// Creates the Model for the User Schema
var Location = mongoose.model('Location', LocationSchema);
Expand Down

0 comments on commit c7bbcfe

Please sign in to comment.