index: mmap: add support for searching

Almost a clean copy & paste from the previous implementation.
2 files changed