Comments (4)
@akbt There is currently no built-in synchronization mechanism. Is there a reason why you're doing a periodic dump of your data to a Typesense collection instead of propagating the changes in real-time? i.e. when you add a record to your primary database, add it to Typesense there and then (similarly for update and deletion)?
from typesense.
@kishorenc According to me (and correct me if I'm wrong) I'm afraid it might give rise to some inconsistencies & also I'll have to make changes to the primary server to update each collection. What happens when I have numerous collections?
I would like typesense to be more of a plug and play model where my main server should not know about typesense server.
from typesense.
Usually there is no 1:1 mapping between a DB table and a Typesense collection. The records in a typical table will be normalized and will have mostly id
fields linking to other tables, while on Typesense you will generally write a denormalized object. For e.g. if you are storing a bunch of books, it's likely that that author fields in the DB table would be id
s, while in Typesense you would want the actual author names so that they are searchable.
This makes a connector-like project not very useful in practical scenarios. That's one of the reasons why Elasticsearch discontinued their River plugin, and I see that mongo-connector is also deprecated and not supported by Mongo anymore.
If consistency is absolutely critical, my suggestion is to temporarily write all operations to an intermediate collection (essentially treating it as a queue) and have a background job to read from the queue and write to Typesense. Your temporary collection could have the following fields: timestamp
, operation
(insert/delete/update), data_to_write
. This way, you can ensure that even if Typesense is down, you are not losing the synchronization.
In the future, this might be something we could support out of the box, and I think this is a far better model than trying to do a 1:1 mapping.
from typesense.
An intermediate collection does seem to be a good idea . Thanks for the suggestion.
from typesense.
Related Issues (20)
- Query containing two synonyms at once does not seem to match documents
- Scoped keys are allowing listing of all collections HOT 2
- Able to disable synonym search in the query
- How do I monitor my instances (RAM/Swap usage) HOT 1
- Error while removing field `field_name` from document HOT 1
- Search request with large number for max_facet_values does not terminate HOT 2
- Question: we have multiple tables and have relation between them in that scenario what should we do if we want to implement typesense HOT 1
- Allow late filtering or disable query modifications HOT 3
- Apply Override Selectively to a Query in real time? HOT 1
- GPU mode crash - need Typesense GPU dependencies source HOT 3
- Add support for combined image and text embeddings using CLIP
- Multiple standalone instances on same server HOT 1
- Documents cannot be retrieved if 'id' field contains '/' character HOT 2
- Cannot regenerate access token by valid refresh token for gcp vertexai Text embedding.
- Deleting all documents in collection HOT 1
- A preceding newline is returned when importing a specific record HOT 6
- Ambiguous error (Field `title` is already part of the schema) HOT 2
- BUG - Typesense does not considers "query_by_weights" when equal weightage is same
- [Joins] Having issue with the querying HOT 26
- Alias names are not reserved if the collection it's pointing at doesn't exist HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from typesense.