google cloud platform – How to get additional custom fields when querying vector search index in GCP vector search?

I’ve setup my index and can query it just fine – the problem is that i don’t find any documentation on how to get additional fields in result from query.

Usually the expected format for the embedding.json that the index will use:

{ "id:"some_id1", "embedding":[embbedding_vector] }
{ "id:"some_id2", "embedding":[embbedding_vector] }

I’ve added more fields, for example:

{ "id:"....", "embedding":[embbedding_vector], "text_chunk":".....", "custom_field":"....." }

For now, once I retrieve matches from my index using

my_index_endpoint.find_neighbors(...)

But it only returns id and embedding fields.

i can parse result and use id field to read through the original embedding file and retrieve the line it correspond to. but this just seems wrong. Maybe I’m using the service wrong? or there’s a hidden option?

I’m thinking of switching to big query since it has a vector search feature and seems more straight forward.

Read more here: Source link