Optimizing Similarity Search in the M-Tree