Hi @Keith_Kwan and welcome to MongoDB community forums!!
The documentation for the vector search have been crafted to explain the concepts in more simpler way. The documentation explain the vector embedding for the single field but the vector embedding can be added for multiple fields as well.
I tried to update the sample data in the Atlas using some additional fields like:
Atlas atlas-b8d6l3-shard-0 [primary] vertorSearch> db.textSearch.find()
description: "Italian cheese typically made from buffalo's milk.",
reviews: 'The recipie turned out to be really nice.',
description: "Italian hard, granular cheese produced from cow's milk.",
aging: 'at least 1 year',
reviews: 'This cheeze is good for making pizza',
description: "Greek brined white cheese made from sheep's milk or from a mixture of sheep and goat's milk.",
aging: 'about 3 months',
reviews: 'This is good for salads and authentic Italian pizza'
and added the following index search for the same.
finally I tried the query for the egVector2 field values like:
-0.015739429742097855, 0.04937680810689926, -0.1067470908164978, 0.1293928325176239, -0.03162907809019089
and I was able to get two documents that matched the vector values.
Please note that the vector in the search query has been randomly generated to retrieve the output from the $search operation.
Vector embeddings are added to the text fields on which the $search operation is applied. It’s important to note that having multiple vector embeddings wouldn’t be meaningful; rather, it would increase the document size.
Since the $search operation can only be utilised in the first stage of the aggregation pipeline, it is recommended to use vector embeddings for a single field. However, to better understand your specific requirements and use case, could you help me understand the requirement to use multiple vector embedding?
Please reach out if you have any further questions.