-
-
Notifications
You must be signed in to change notification settings - Fork 211
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
Make freetext search view indexes "offline only" #9544
Comments
Here are my conclusions after taking a deep dive into possible implementations. The main approach options seem to be:
Alternative rejected:I also took some time to look into any Pouch-specific alternative approaches to freetext searching (since we will no longer be tied to solutions that also work in Couch). Unfortunately, there is absolutely nothing viable here. My original hope was that Mango Beyond Mango, any discussions of freetext searching in Pouch seem to mention pouchdb-quick-search which has not been updated in |
Also here is my conclusion and next steps based on the above analysis:
So, I am currently doing further investigation and prototyping for |
I also agree that Right now, when the app gets an update, there are two things that need to be updated: 1. the medic-client ddoc and 2. the actual app code. We do tell people that they should reload their app to use the new code, but it's entirely possible some app somewhere runs and old webapp code with the new ddoc. I remember we even tracked this through telemetry on some instance that was reporting errors at some point. There's an issue: #7146 |
As far as I know pouchdb doesn't do background indexing, and ignores the Another option would be to store the client only ddoc as an attachment on the I think I'd go for |
Is your feature request related to a problem? Please describe.
If we move to Nouveau for freetext searching on the Couch server (aka "online" use), then we still need a solution for freetext searching "offline" (what offline users would experience via their local Pouch instance).
Describe the solution you'd like
The most straightforward approach should be to just have a design doc that is "client-only" similar to how we have docs that are currently "server-only". This design doc will be indexed by PouchDB clients, but will not be indexed by the Couch server.
Since we are likely going to require a complete re-indexing of these views on the client devices one way or the other, we should take this opportunity to remove the unused
key:value
emissions from the freetext views as originally proposed for the "freetext-lite" views.Describe alternatives you've considered
One interesting alternative would come after our upgrade to Pouch
9
and theindexeddb
adapter. IIRC, Mango queries should be more performance on Pouch withindexeddb
. If that is the case, then we could evaluate possibly using Mango queries for freetext searching. This one blog post suggests it works well... 😅The text was updated successfully, but these errors were encountered: