Spotlight – “A few years ago, it seemed to search everything (apart from system files), but now it can’t even find your Mail messages, and the whole data for apps like Notes are invisible to it.”

Link. “mdutil -E / erases the indexes on your startup volume”