Combine words#index and words#search
Check whether the query is empty in Word.search