If you do a search, it would be helpful if the category links in the sidebar were updated to reflect the matching posts, i.e. instead of listing all categories with their total number of posts, show only matching categories and the number of matching posts.
If we have:
After searching for "java":
Clicking on "Travel" would refine the search and list "My Vacation in Indonesia", clicking on "Programming" would list e.g. "Java is Open Sourced" and "Java Benchmark".
While viewing a post, only categories that are used for the current post should be shown.