Write a function to perform efficient vector similarity search using an approximate nearest neighbor (ANN) approach.
Implement cosine-similarity search with locality-sensitive hashing (LSH) using random hyperplanes. The function receives an array of vectors and one query vector, then returns the indices of the k nearest vectors in descending cosine-similarity order. Use the supplied seed to make the index deterministic. If fewer than k candidates are found in matching buckets, evaluate all vectors as a correctness fallback.
Signature: def ann_search(vectors, query, k, num_tables, hash_size, seed):
Vectors are non-empty numeric arrays with equal dimensions. Return a list of k integer indices.
def ann_search(vectors, query, k, num_tables, hash_size, seed):