-
Type: Improvement
-
Resolution: Won't Fix
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Catalog and Routing
-
CAR Team 2024-10-28, CAR Team 2024-11-11
-
(copied to CRM)
-
2
In most recent MongoDB releases (e.g. 5.0+), "Index key pattern too large" error message will be received if there are more than 32 fields when creating a compound index. This is due to documented limit in Number of Indexed-Fields in a Compound Index.
For example, if running the createIndex command from createindex-toolarge.nosql file, it will fail with an error message "...caused by :: Index key pattern too large".
The error message is not obvious to a user who run the create index command what goes wrong and often the user will mistakenly think the other limit 1024 byte index limit which has been resolved since 4.2. This can cause confusion.
We can improve the error message to be more direct and explicit, like "caused by :: Index keys (fields) exceeded the limit (32) for the number of indexed fields" or something similar.
- related to
-
SERVER-96216 Amount of keys is not validated in create text index
- Backlog