Most of the difficulty in search is dealing with the sheer volume of data. The algorithms themselves are pretty trivial for the most part.