support for constraints

The search method now supports constraints; order is still not supported
since search results are ordered by relevance, so a forced order doesn't
make much sense and is generally a mistake.