Efficient and Flexible Search in Large Scale Distributed Systems