By "not working", I'm not sure if you mean the browse tree code sample is not working or if the custom query that you are encoding in it is not working.
Check if your query is giving the expected results first. Try "keywords: project1" (remove the space after the colon ... stupid smilies) (the URL decode of "keywords%3Aproject1") in a basic search. If it is not giving you the results you expect, then I would investigate that, rather than the Browse tree code.
Another line of troubleshooting is to take a valid search string and add it to your custom browse tree (URL-encoding it if needed). Does the browse tree give the correct response?
A third line of troubleshooting would be to upload your XML metadata document containing "project1" to gptogc.esri.com. Approve it for searching. Wait a few minutes (to make sure indexing kicks in) and then try the "keywords:project1" search.