Adds basic test for search query and adjusts how the search functions.
Currently doesn't work, needs a conditional where string builder.