Skip to content

Commit

Permalink
nvm
Browse files Browse the repository at this point in the history
  • Loading branch information
a-rothwell committed Oct 6, 2023
1 parent e6ef8f8 commit 8f74c70
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 9 deletions.
4 changes: 0 additions & 4 deletions dist/bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -287,10 +287,6 @@ function MongoDBVectorKNN_default(rivet) {
const database = data.useDatabaseInput ? inputData["database"]?.value : data.database;
const collection = data.useCollectionInput ? inputData["collection"]?.value : data.collection;
const path = data.usePathInput ? inputData["path"]?.value : data.path;
const indexes = client.db(database).collection(collection).listIndexes().toArray();
if (indexes.length === 0) {
throw new Error(`No search index found for collection ${collection}. A search index must be created before using this node. See the readme for more information.`);
}
results = await client.db(database).collection(collection).aggregate(
[{
"$search": {
Expand Down
5 changes: 0 additions & 5 deletions src/nodes/MongoDBVectorKNN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,11 +204,6 @@ export default function (rivet: typeof Rivet) {
const collection = data.useCollectionInput ? inputData['collection' as PortId]?.value as string : data.collection as string;
const path = data.usePathInput ? inputData['path' as PortId]?.value as string : data.path as string;

const indexes = client.db(database).collection(collection).listIndexes().toArray() as any;
if(indexes.length === 0) {
throw new Error(`No search index found for collection ${collection}. A search index must be created before using this node. See the readme for more information.`);
}

results = await client.db(database).collection(collection).aggregate([{
"$search": {
"knnBeta" : {
Expand Down

0 comments on commit 8f74c70

Please sign in to comment.