Implementation of two different strategies for calculation of search length.

This one is missing on the docs.