flexsearch icon indicating copy to clipboard operation
flexsearch copied to clipboard

this.db.transaction is not a function

Open masylum opened this issue 5 months ago • 2 comments

While using indexdb, doing a search blows up randomly with this.db.transaction is not a function.

It smells like it might be a race condition with this? https://github.com/nextapps-de/flexsearch/blob/master/src/db/indexeddb/index.js#L359

I'm currently indexing while searching.

masylum avatar Jul 16 '25 12:07 masylum

Also facing a similar issue, which seems to appear when calling Document.clear, which I believe calls IdxDB.clear. I notice that a version change could trigger this.db being set to null in IdxDB.close(), but I don't think that's happening in our case.

rollie42 avatar Aug 13 '25 08:08 rollie42

I've removed this line in the latest version but probably it does not fix your issue. I will further investigate into the transaction handling soon.

ts-thomas avatar Sep 07 '25 09:09 ts-thomas