Unlike find, locate not real-time search. You need to update the database, index file to get the latest information.
Looking for a path string contains:
$updatedb
find a real-time look, if you need faster query, you can try locate; locate the file will be indexed database system, if there is a file update, you need to perform an update command to update the index database on a regular basis:
$locate string