#community-help

Understanding Indexing and Cloning in Typesense

TLDR Calum learned about immediate indexing in Typesense and the new feature of index cloning from Jason.

Powered by Struct AI

1

8
12mo
Solved
Join the chat
Oct 14, 2022 (12 months ago)
Calum
Photo of md5-162162ca008ade58341a6453c698d386
Calum
10:36 PM
Hey guys! I’m new to typesense. I have a quick question - if I index some data, does the indexing happen straight away as in it is searchable immediately once I get a 200 response? Or is it like elasticsearch where it indexes a few seconds later?
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
10:38 PM
Indexing is synchronous in Typesense, so if the API returns a 200, it means the data has been indexed and will be available for search.

That said, when running in HA clustered mode, each node is eventually consistent, so there will be a few seconds delay from a 200 and when the data shows up in search on each node, depending on the network latency between the nodes

1

Calum
Photo of md5-162162ca008ade58341a6453c698d386
Calum
11:01 PM
Thanks for this Jason
11:02
Calum
11:02 PM
Got another follow on question, you clone/duplicate an index?
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
11:07 PM
Meaning in clustered mode, or are you asking if you can clone a collection in general?
Oct 15, 2022 (12 months ago)
Calum
Photo of md5-162162ca008ade58341a6453c698d386
Calum
01:09 PM
Clone in general
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
01:10 PM
We’ve added support for cloning a collection in the recent rc build 0.24.0.rcn17: https://gist.github.com/jasonbosco/8e16adeac8ff35ece4359fc9f0527511
Calum
Photo of md5-162162ca008ade58341a6453c698d386
Calum
01:10 PM
That’s awesome!