use an initial query in search

should fix #1254