Ensuring Uniqueness During Records Creation in Typesense
TLDR Krish inquired about ensuring uniqueness during record creation in Typesense. Kishore Nallan explained that uniqueness can be maintained using the 'id' field in documents, and when creating documents, the system automatically assigns a unique id if none is provided.
Dec 14, 2022 (9 months ago)
Kishore Nallan11:04 AM
idfield in the document is used as the identifier by convention. It can be used to ensure uniqueness.
Kishore Nallan11:31 AM
Kishore Nallan11:33 AM
idis provided then
idis autoassigned in running sequence. If an
idis provided we will use that.
Kishore Nallan11:34 AM
return_id=trueflag then the created
idis returned (in 0.24 RC)
Kishore Nallan11:38 AM
idmust be a string. You can just hash the document to produce a SHA and use that as ID.
Kishore Nallan11:39 AM
Kishore Nallan11:40 AM
Kishore Nallan11:41 AM
idhappens to be an integer simply because we have a running sequence to choose from that won't duplicate but it can be anything.
Indexed 2764 threads (79% resolved)
Understanding Document ID Fields and Rectifying Duplicate Document Error
John queried about understanding document ID fields and fixed a duplication issue with guidance from Jason. They discovered a bug preventing document deletion due to a URL encodable character, with John opening a GitHub issue for it.
Issue with Typesense Schema and Ruby Client
Mateo faces issues while creating a schema and using Ruby client for Typesense. Jason suggests using a new field instead of 'id' and provides assistance for Ruby client errors.
Handling Kinesis Stream Event Batching with Typesense
Dui had questions about how to handle Kinesis stream events with Typesense. Kishore Nallan suggested using upsert mode for creation/update and differentiating with logical deletion. After various discussions including identifying and resolving a bug, they finalized to introduce an `emplace` action in Typesense v0.23.
Troubleshooting Create Index Issue on Typesense Instance
John was having issues creating new indices on a Typesense instance which Jason suggested could be due to old bugs or heavy search queries monopolizing CPU. After a restart, the issue was resolved. Jason also recommended upgrading the Typesense version.
Threading Problem During Multiple Collection Creation and Batch Insertion in Typesense
Johan has a problem with creating multiple collections and batch-inserting documents into Typesense, which is returning results from different collections. Kishore Nallan helps troubleshoot the issue and suggests a potential local race condition, which is fixed in a later build.