Infield fly call requires 4 elements. 1) less than 2 out, 2) runners on 1st & 2nd OR bases loaded, 3) batted ball is hit higher than the tallest infielder (obviously judgment call), 4) batted ball is not hit further from home plate than 2 steps beyond the deepest usual fielding position of the furthest infielder.
The object of element 3) is to bar lineouts from being called an infield fly.