Hi everyone! I'm working with nearest-neighbor vec...
# community-help
d
Hi everyone! I'm working with nearest-neighbor vector search and have two collections, A and B, both containing embeddings. I want to find the nearest vectors in collection B for a specific document in collection A. Currently, I'm retrieving the vector from the document in A and then using it as a query vector to search in B. Is there a more streamlined way to achieve this cross-collection vector search with a single query syntax, or is the two-step approach the standard method?
f
Why not save the embeddings on the other collection as well?
d
I’m keeping collections A and B separate because they represent different types of data with distinct metadata and purposes. For example, A has user profiles with embeddings, while B is a set of restaurants with menus as their own embeddings. I could merging the embeddings into a single collection and then retrieve the corresponding metadata by joining with another collections. Is it the best way to bridge A and B?
f
Since you can't query by joined fields ATM, that would be suboptimal
d
@Fanis Tharropoulos In that case using the two-step approach as I described in my post is the best method right now?
f
Yes, unless @Kishore Nallan has something to add
k
Yes two step is the only way to do this now.
d
@Fanis Tharropoulos @Kishore Nallan Understood, thank you!
🙌 2
t
@Darya I have a follow-up question—were you able to use Typesense's auto-embedding to accomplish this? I'd like to use it, but I may not be getting embedding A from Typesense, so I'm wondering if that means I should generate/store the vectors myself upstream.