search() query strings are now encoded as JSON. Added tests for search():ing with a key.