I was able to get what I needed by copying a search form from wordpress (it only searches posts and pages), and then activating a plugin which prevents pages from being searched so that only the posts are searched.
Zen, I will also try your form and see which result works better for me. Thanks for that.