LPS-43941

Hi @ealonso,

These commits for LPS-43941 are the first step to solve LPS-16514. Actually they fix the bug, but it's also planned to refactor some of the existing web content search logic to make it more consistent across the different portlets. 

Other reason why I split the solution into two commits is to allow easier backporting of the bug fix itself (refactoring shouldn't be backported).

Thanks!

@juliocamarero