Closed
Description
Prerequisites
- I have written a descriptive issue title
- I have searched existing issues to ensure the feature has not already been requested
🚀 Feature Proposal
With MongoDB releasing the new vector search index & pipeline stage, Mongoose is missing this PiplineStage, which creates compilation error in TypeScript. The proposal is to add support for this new PipelineStage
Motivation
To maintain & support the typesafe aggregation pipeline in Mongoose.
Example
import mongoose from "mongoose";
const contentsSchema = new mongoose.Schema({
embedding: {
type: [Number],
},
title: String,
});
export const Contents = mongoose.model(
"Contents",
contentsSchema,
"contents",
);
const result = await Contents.aggregate([
{
$vectorSearch: {
index: "title_vector_index",
path: "embedding",
filter: {someField: "value"}
queryVector:[0.3455,......0.123],
numCandidates: 200,
limit: 10,
},
},
]);