prevent unnecessary searching when query changes