Basically, right now I am trying to do some nearest-neighbour searching on an approach where I don't have points in Euclidean space. To do a nearest-neighbour search currently, I take the query and compare it (with a special similarity function) to each model in the database to find the most similar one.
With this similarity function, I can compute pairwise distances between all points in my database, and I'm interested in whether it's possible to learn a projection into Euclidean space such that any new query can just be projected and nearest neighbour searches can then be performed in that Euclidean space.
Does such a method exist, or am I hoping for a holy grail that hasn't been solved?