Offline first full text search #596
Answered
by
samwillis
ouvreboite
asked this question in
Q&A
-
Wondering if some here already tried to do full text search on top of tanstack-db. I see several options and I'm sure I'm missing some.
|
Beta Was this translation helpful? Give feedback.
Answered by
samwillis
Sep 27, 2025
Replies: 1 comment
-
The indexes that are applied to collections are extendable (they are used by the query engine to loop up matching rows), and so it's possible to create a FTS index using something like BM25. We plan to get to this, but current priorities are to stabilise and finish the incremental sync implementation. In my mind we end up with an api like this (after indexing the content column): q
.from({ item: itemsCollection })
.where(({ item }) => fts.like(item.content, 'something')
.select(({ item }) => {
...item,
score: fts.score(item.content, 'something')
}) |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
ouvreboite
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The indexes that are applied to collections are extendable (they are used by the query engine to loop up matching rows), and so it's possible to create a FTS index using something like BM25. We plan to get to this, but current priorities are to stabilise and finish the incremental sync implementation.
In my mind we end up with an api like this (after indexing the content column):