w3c / IndexedDB

Indexed Database API
https://w3c.github.io/IndexedDB/
Other
240 stars 62 forks source link

Support full text indexes #44

Open inexorabletash opened 8 years ago

inexorabletash commented 8 years ago

Either directly support full text indexes, or provide the primitives necessary to build them, which might include prefix-based searching, expression indexing, etc.

Imported from https://www.w3.org/2008/webapps/wiki/IndexedDatabaseFeatures

inexorabletash commented 8 years ago

i.e. may just be https://github.com/w3c/IndexedDB/issues/33

nolanlawson commented 7 years ago

+1, big missing feature between WebSQL and IDB.

I agree this should be closed though in favor of #33 (w/ worklets). It ought to be out-of-scope to define particular stemmers for particular languages (e.g. Porter/English by default, as SQLite does). The worklet solution neatly allows e.g. Lunrjs to create their own. Folks will also inevitably want very complex stemmer functionality (e.g. "parse this field both as French and as English, index the union of all tokens") and such things should be solved in userland IMO.

Unsolved by #33 however: how to implement a scoring function, e.g. TF-IDF, DisMax, etc.

inexorabletash commented 7 years ago

If you're watching this issue...

One of the primitives necessary for building full text search on top of indexes is text segmentation. @littledan has a proposal for adding this to ECMA-402 (the ECMAScript Intl object). He'd love feedback:

EloB commented 6 years ago

This is one of the big reason why I rather use WebSQL instead of Indexeddb.

aphillips commented 6 years ago

@nolanlawson and @inexorabletash have identified a couple of the challenges with implementing FTS: it's language sensitive, and open source provides imperfect solutions even for common languages. That's not an argument against it as a desirable feature, just a practical observation.

inexorabletash commented 5 years ago

TPAC 2019 Web Apps Indexed DB triage notes:

Valid use case, and also very complicated. Waiting on someone to come forward with a good design and POC, either high level or via primitives.

(Re: primitives - see #38)

kaizhu256 commented 4 years ago

perhaps the best solution is to use sql.js instead? i'm skeptical about the usability and performance of an indexeddb solution compared to sqlite3.

inexorabletash commented 4 years ago

@kaizhu256 - take a look at https://github.com/fivedots/nativeio-explainer