Wow. Back in the day, I had to do cosine similarity indexing with pg-cube. It only did euclidean distance, so I had to store a separate column with normalized vectors.
Cosine similarity measures the angle between two vectors instead, and doesn't suffer from the curse of dimensionality.
I guess it's important to have this in your DB, so you make "nearby" queries (give me text that's similar to this other text) in an efficient way.