Please solve the programming task below using a self-contained code snippet in a markdown code block.

Given a string text and an array of strings words, return an array of all index pairs [i, j] so that the substring text[i...j] is in words.
Return the pairs [i, j] in sorted order (i.e., sort them by their first coordinate, and in case of ties sort them by their second coordinate).
 
Please complete the following python code precisely:
```python
class Solution:
    def indexPairs(self, text: str, words: List[str]) -> List[List[int]]:
```