The Stanford Technology Law Review has an interesting article, No Analog Analogue: Searchable Digital Archives and Amazon's Search Inside the Book by Jonathan Kerry-Tyerman, of the University of San Francisco.
He argues that the Amazon "Search Inside" the book feature actually infringes current copyright law but that because it serves the purposes of copyright law, as stated in the US Constitution, that it should not create liability for the providers of such programs. It's a neat argument and it has been made before but it doesn't always persuade the courts. Google v the publishers, in the Google Book search case, has the potential to provide a clear line in the law. It remains to be seen whether the opportunity is grasped.