Change search() signature

Pass SpNode as template parameter.

No functional change.