defined query for search