Putting ordering logic inside search classes