Alphabetical order by first name?

Even that doesn’t solve the problem, because people will enter different names at different point in their lives, use nicknames, etc.

And institutions have the same problem. I teach at a school with a name like “School of Arts and Science Magnet at John Brown Academic Center” (for real, it’s that long). I have to look up the school on a drop down menu like, weekly. Both inside and outside the district. You would not believe the variations as some random person tried to cram that stupidly long but generic name into a character limit. So I can be searching by “Science” but it turns out someone reduced it to “A & S” or any number of other variants. It’s a constant low level aggravation. One problem is that once a building is named for someone, you can’t drop the name, no matter how the purpose of the building changes, because some great grandchild of the long forgotten school board member will freak out (literally) And people are sentimental over the names of their schools. But things change over the years, schools and buildings are repurposed over time. So, no lie, you move an elementary school, as an institution, into a building next door that used to house a middle school, and you get an official name like “John G. Frankfort Elementary at Seymore Bryant Beans”. I made that up, but I know several similar schools. And I promise you, everyone would call it “John G” and it would be unpredictability listed as “Frankfort” or “Beans” or “JGFESBB” Elementary in different directories.

When I used to mentor young software developers I’d say

Any IT system is a model of the world. Most we work on are models of the human world, not the neat scientific world. Our programming is an inconsistent mess because the human world is an inconsistent mess. You’re not going to fix the world, so suck it up and build systems that can tolerate messy inconsistency.

Since you are talking about IT systems, a simple solution would be, let us say given a guy named “Luís Vaz de Camões”— you have no idea whether someone is going to look for him under “C”, or “L”, or “D”, or even “V”— to index him under all of the above. Worst case, they get a cross-reference like “see Camões, Luís de.