Skip to content

Instantly share code, notes, and snippets.

View childrentime's full-sized avatar
🎯
Focusing

Berlin childrentime

🎯
Focusing
  • ShangHai
  • 17:25 (UTC +08:00)
View GitHub Profile

This demonstrates the implementation of full text search for documents in Indexed DB.

  • Word-breaking and stemming is used to create a list of terms for each document.
  • Document records are annotated with the list of terms when added to the database.
  • A multi-entry index on the list of terms is populated.
  • A query is similarly processed into a list of terms.
  • A join over the terms is implemented using multiple cursors on the index.

The necessity of annotating records with the word list to populate the index is a limitation of the current Indexed DB API. A feature request to support custom