+1, this looks good to me. If ik_poses.size() ==1, I'd add a call to the regular searchPositionIK, and only print the msg in other cases. This needs an example of where such a function is useful (an example case) and a not stating that this is not typical use if you have a chain. 
Attn: @sachinchitta