Added a similarity search function.