-
-
Notifications
You must be signed in to change notification settings - Fork 353
Open
Description
Describe the bug
Hi,
it seems that the second example, the one using @orama/plugin-embeddings
does not work as expected.
From what I can see:
- the first import is missing
insert
andsearch
- then the search throws an error
Maybe we need to add a check for
file:///..../node_modules/@orama/orama/dist/esm/methods/search-vector.js:15 const vectorIndex = orama.data.index.vectorIndexes[vector.property]; TypeError: Cannot read properties of undefined (reading 'property')
vector
is being defined here or use another import.
Also check the first example. It imports remove‘ and
searchVector’ but doesn't use them. It's not a big deal, but I think it's better to remove them or add some code that uses them for better understanding.
Regards,
Diego
To Reproduce
Just try the example with @orama/plugin-embeddings
Expected behavior
To run without issues
Environment Info
OS: Ubuntu 24.04.2 LTS
Node: v22.14.0
Packages
"@orama/orama": "^3.1.6",
"@orama/plugin-embeddings": "^3.1.6",
"@tensorflow/tfjs-node": "^4.22.0"
Affected areas
Initialization, Search
Additional context
No response
Metadata
Metadata
Assignees
Labels
No labels