Using this implementation of plocate with updatedb in it, one can build a custom version to follow symlinks. I don't know if it answers the question also for mlocate, I only use plocate.
If you are certain there will be no loop in your filesystem, you can simply replace the code
e.is_directory = (de->d_type == DT_DIR);
by
e.is_directory = (de->d_type == DT_DIR) || (de->d_type == DT_LNK); // or even just true
in the file updatedb.cpp.
If you might have loops, here is a solution (maybe not very efficient). Always in updatedb.cpp, declare a global variable vector<char*> explored; just before the function int scan(...). Then, add the following code after the two first tests in that function scan:
char buf[PATH_MAX];
realpath(path.c_str(),buf);
for (auto &e : explored)
if (strcmp(e,buf) == 0)
return 0;
explored.push_back(buf);
And just before each return of that function, add an explored.pop_back();.
With similar modifications of the code, one can follow symlinks only when inside certain directories, and/or completely exclude some directories of the database, depending on one's need. It is also quite useful to make the results clickable.
updatedbinstalled in VMs.