Searching code (legacy) - GitHub Docs

You only need to use the legacy code search syntax if you are using the code search API.