I’m trying to implement semantic search over multiple text fragments within a single document, and I’m unclear whether Couchbase’s vector search supports searching across a list of embedding vectors stored in one field.
“curious_fact_embeddings”: [ [0.123, 0.456, 0.789, …], [0.234, 0.567, 0.890, …], [0.345, 0.678, 0.901, …], [0.456, 0.789, 0.012, …]]
I want to search across all individual vectors within curious_fact_embeddings to find the document with the most semantically similar fact.
My search code:
vector_query = VectorQuery.create(
"curious_fact_embeddings",
query_vector, # 768-dimensional query vector
num_candidates=20
)
vector_search = VectorSearch.from_vector_query(vector_query)
results = collection.search(vector_search)
I tested by embedding a single string, and the results are a lot better. Is the semantic search averaging results over all embeddings in the list? Depending on the string order, the results vary.
Does Couchbase vector search support indexing and searching a field containing multiple vectors (list of lists)? If yes, how should I configure the Search index to handle this structure?
If no, what’s the recommended pattern?
Any guidance would be greatly appreciated!