-
Type:
New Feature
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: Doctrine
-
None
-
PHP Drivers
-
Not Needed
-
None
-
None
-
None
-
None
-
None
-
None
Add $vectorSearch stage to Doctrine MongoDB ODM.
There is a strong relation between the $vectorSearch stage and the Vector Search index. It should be possible to automatically fill the "path" value from the index name, using the document VectorSearch metadata
->vectorSearch()
->index('faces')
->path('descriptionEmbeddings') // could be omitted
->numCandidates($limit * 20)
->queryVector($face->descriptionEmbeddings)
->limit($limit)
Question: is there a risk of confusion between limit parameter and the $limit stage in the fluent API ?
We can also create a #[VectorIndex] attribute that extend #[SearchIndex], promoting all the properties as main parameters.
#[ODM\VectorIndex(
name: 'descriptions',
numDimensions: 1024,
path: 'descriptionEmbeddings',
similarity: 'euclidean',
filters: ['packages', 'tags'],
)]
- related to
-
PHPORM-381 Add Vector Search indexes in Doctrine ODM class metadata
-
- Closed
-
-
PHPORM-382 Doctrine ODM: Add VectorSearch stage to aggregation builder
-
- Closed
-