Use longer line first while searching.