Optimizing wbsearchentities and adding some documentation

Change-Id: I73b28dd3937a19d59aa2731ea7d0943c7d59b0bc
Merge "Optimizing wbsearchentities and adding some documentation"