Closed blahah closed 7 years ago
@fergiemcdowall I've started seeing this a lot since upgrading search-index to the latest version. Have you seen it before?
Ah yes- I made a small API change to search-index@0.13.0
. Since search-index
is still in beta (0.x.x), these breaking changes dont get a major version bump- on reflection, maybe its time that they did.
Anyway, long story short- when adding docs you now use feed
:
fs.createReadStream('data.json') // <- from a file
.pipe(myIndex.feed())
.on('finish', function() { /* done */ })
or
myReadStream // <- a readable stream of objects
.pipe(myIndex.feed({ objectMode: true }))
.on('finish', function() { /* done */ })
(The old .defaultPipeline
-> .add
will still work if you set objectMode
in the options of .defaultPipeline
)
@fergiemcdowall aha! Thanks for the explanation and I'm just happy it was something simple :D
Fix incoming
@fergiemcdowall does this only apply to adding? in particular, is the del
API the same?
.del should be unchanged.
Fixed in https://github.com/blahah/yunodb/commit/0fcdb81a19e5ef18553fb8b6cfb2981d08798cc7
This also fixes #104 and #112
still happening in v1.0.5
- issue is somewhere in the del
method of search-index
.
for now, working around this by updating only the document in yunodb
: https://github.com/blahah/yunodb/commit/62a7cd806b97b5e1e8e284a392aa1fa0d716c94f
https://sentry.io/codeforscience/sciencefair/issues/302489702/
cc @fergiemcdowall