telefonicaid / iotagent-node-lib

Module to enable IoT Agent developers to build custom agents for their devices that can easily connect to NGSI Context Brokers
https://iotagent-node-lib.rtfd.io/
GNU Affero General Public License v3.0
58 stars 84 forks source link

create mongodb index over Device collection #1576

Open AlvaroVega opened 5 months ago

AlvaroVega commented 5 months ago

Component

No response

Is your feature request related to a problem? Please describe

over id, s, ss, apikey and maybe type

Describe the solution you'd like

No response

Describe alternatives you've considered

No response

The systemd version you checked that didn't have the feature you are asking for

No response

AlvaroVega commented 5 months ago

Similar to https://github.com/telefonicaid/iotagent-node-lib/blob/301280a4644a93a68a836ec4a9ee2278f88f515a/lib/model/Group.js#L72

Old index with unique over id was removed https://github.com/telefonicaid/iotagent-node-lib/commit/08601b0a7e09368ffe68d51026b685c32dff0b67

KeshavSoni2511 commented 4 months ago

Hi @AlvaroVega, is mongodb index required in https://github.com/telefonicaid/iotagent-node-lib/blob/301280a4644a93a68a836ec4a9ee2278f88f515a/lib/model/Command.js#L37 If yes, should I raise a separate PR with the code changes.

AlvaroVega commented 4 months ago

I have no inputs about an index is required for commands. IMHO if not sure not add index.