Currently, we instantiate one IndexAccessMethod-based class for each index. In the case of a compound index, that class must handle all types in the compound index. This means for each special index type, the code must also handle regular (ascending/descending) indexes. At a minimum, we might be able to refactor so that each implementation for handling regular indexes calls into the same helper methods.
But it might prove more robust in the long-term if we refactor a bit higher up the stack. If, instead of instantiating a specialized IndexAccessMethod for each index, we were instead to have a generic top-level class which iterates over fields in an index, and calls specialized handlers based on the type of indexed field, we are likely to have less issues due to duplicated, subtly different code.
- related to
-
SERVER-75505 Difference in dotted path handling between index types
- Closed
-
SERVER-23533 Multikey 2dsphere indexes can support compounding bounds in more cases due to keys generated
- Backlog