Fix search, show function and implement document function