Search implementation

This refs affinitic #5893