search: some refactor cleanup in prep for sorting work

Change-Id: I71d422774bb68a93c9f9d648de8e4e5bc2ef1d87