COMMONS-190: unified search - move all shared code in API into the implementation