If you have installed just SharePoint Foundation (SPF) and created a site collection before turning search service on (which is off by default when you install SPF), you will get an error "your search cannot be completed because this site is not assigned to an indexer.".
After starting the service it still did not resolve the issue, so I tried to find where to assign the indexer to the site. Before long, I realized that it is not on the site collection settings, nor on the web application settings but instead on the content database setting.
Just go to the manage content databases screen in central management, click on the content database in question (usually WSS_Content) and in the middle of the page there is the option to select a search server.
PS - is anyone else finding it puzzling that the default name for a SPF database starts with WSS? Maybe MS will change that before release?