reverted search not working with pg