Useful whenever data lacks a linear or natural order, but there is a notion of similarity.
Vector spaces, strings, sets, graphs, collections, etc.
Given a metric space $(U, d)$ and a database $S \subseteq U$, create a data structure on $S$ to solve efficiently queries $q \in U$.
The distance function must be a metric, i.e., for any $u,v,w \in U$:
There is a lot of work under these schemes.
Another issue with traditional approaches comes with large datasets and high dimensions:
In any case, as the dimension increase, the discarding power of any exact metric index is heavily degraded; the approach is cursed.