Text this: Optimal search algorithm in a big database using interpolation–extrapolation method