  We study the similarity search problem which aims to find the similar query
results according to a set of given data and a query string. To balance the
result number and result quality, we combine query result diversity with query
relaxation. Relaxation guarantees the number of the query results, returning
more relevant elements to the query if the results are too few, while the
diversity tries to reduce the similarity among the returned results. By making
a trade-off of similarity and diversity, we improve the user experience. To
achieve this goal, we define a novel goal function combining similarity and
diversity. Aiming at this goal, we propose three algorithms. Among them,
algorithms genGreedy and genCluster perform relaxation first and select part of
the candidates to diversify. The third algorithm CB2S splits the dataset into
smaller pieces using the clustering algorithm of k-means and processes queries
in several small sets to retrieve more diverse results. The balance of
similarity and diversity is determined through setting a threshold, which has a
default value and can be adjusted according to users' preference. The
performance and efficiency of our system are demonstrated through extensive
experiments based on various datasets.
