PLA-1790 20% search services refactoring

Docblock describing the structure of $details is more than welcome here :)