fergiemcdowall / search-index

A persistent, network resilient, full text search library for the browser and Node.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How can I delete all documents?

everlose opened this issue · comments

It seems that the API DELETE must receive an array parameter.
How can I delete all documents, I don't want to use ALL_DOCUMENTS() and traverse it.

At the moment you have to do

// where 'db' is the name of your index
db.INDEX.STORE.clear()

(In the future it would be great to have this as a top-level function like db.FLUSH() or similar)

At the moment you have to do

// where 'db' is the name of your index
db.INDEX.STORE.clear()

(In the future it would be great to have this as a top-level function like db.FLUSH() or similar)

Thanks

👍👍