Skip to content

Adding OdeBsmJson index and additionalIndexes generator#37

Merged
jacob6838 merged 1 commit into
developfrom
bsm-indexes
Aug 8, 2025
Merged

Adding OdeBsmJson index and additionalIndexes generator#37
jacob6838 merged 1 commit into
developfrom
bsm-indexes

Conversation

@jacob6838
Copy link
Copy Markdown

  • Adding "additionalIndexes" field to create_indexes.js script, with createAdditionalIndexes
  • Adding OdeBsmJson index for metadata.odeReceivedAt_-1_payload.data.coreData.position.latitude_1_payload.data.coreData.position.longitude_1 to new additionalIndexes

@jacob6838 jacob6838 requested a review from Michael7371 August 8, 2025 15:55
@jacob6838
Copy link
Copy Markdown
Author

I tested using the 2d_sphere on payload.data.coreData.position, but the index fails - it needs an array, not an object like {latitude, longitude}

Copy link
Copy Markdown

@Michael7371 Michael7371 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a question

Comment thread mongo/create_indexes.js
{name: "OdeDriverAlertJson", ttlField: "recordGeneratedAt", "timeField": "metadata.odeReceivedAt", intersectionField: null, rsuIP:"metadata.originIp", expireTime: expireSeconds},
{name: "OdeBsmJson", ttlField: "recordGeneratedAt", "timeField": "metadata.odeReceivedAt", intersectionField: null, rsuIP:"metadata.originIp", expireTime: expireSeconds},
{name: "OdeBsmJson", "timeField": "recordGeneratedAt", rsuIP:"metadata.originIp", expireTime: expireSeconds},
{name: "OdeBsmJson", "timeField": "recordGeneratedAt", rsuIP:"metadata.originIp", expireTime: expireSeconds, additionalIndexes: [{"metadata.odeReceivedAt": -1, "payload.data.coreData.position.latitude": 1, "payload.data.coreData.position.longitude": 1}]},
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(question) Why not just add another entry for the long lat index like the other indexes do?

Copy link
Copy Markdown

@Michael7371 Michael7371 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jacob6838 jacob6838 merged commit f428642 into develop Aug 8, 2025
3 checks passed
@jacob6838 jacob6838 deleted the bsm-indexes branch August 8, 2025 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants