Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text search #29

Open
aboodman opened this issue Apr 13, 2022 · 5 comments
Open

Text search #29

aboodman opened this issue Apr 13, 2022 · 5 comments
Assignees

Comments

@aboodman
Copy link
Contributor

This needs a plan. Or should be removed from the UI :(.

@hamzaydia
Copy link

a live onChange search is a must

@isaachinman
Copy link

isaachinman commented Dec 7, 2024

Hey everyone – sorry to ping a very old issue.

I'm evaluating Replicache now, and text search across a very large cache was the exact reason I cloned this repo to have a look.

Does anyone have any suggestions or examples of how to handle that in a reasonably performant way?

I have seen that a naive scan like this:

const matches = []

for await (const items of tx.scan()) {
  if (item.text.includes(searchQuery) {
    matches.push(item)
  }
}

Works fine for small datasets, but obviously falls apart with larger datasets.

Update: Did some digging and found the Assetbots writeup, which mentions Fuse. Have implemented this myself and can confirm it works nicely.

I think adding Fuse on a worker would be a nice touch to this repo.

@brandondrew
Copy link

I'll save everyone a search: https://www.fusejs.io/

@isaachinman
Copy link

After a deeper investigation, we found Fuse to be unusable for very large datasets. We settled on MiniSearch and are very happy with its implementation. Replicache+MiniSearch is a very powerful combo indeed

@brandondrew
Copy link

MiniSearch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants