search: code clean-up and documentation
Signed-off-by: Kamil Neczaj <kamil.neczaj@cern.ch> Reviewed-by: Lars Holm Nielsen <lars.holm.nielsen@cern.ch>