Add the vector search function.  Handles both sorted and unsorted vectors.