#community-help

Modifying Schema and Inserting JSON Fields in Typesense

TLDR Sai inquired about modifying the schema and inserting a JSON field after creation, to which Kishore Nallan replied these requests are in backlog and shared a potential timeline for one of them. Additionally, Kishore Nallan suggested a solution for a query issue Sai was facing.

Powered by Struct AI

1

1

1

Aug 05, 2021 (28 months ago)
Sai
Photo of md5-6c1f32ee79d1166e54e3f17345b8d814
Sai
06:57 AM
Kishore Nallan Hey is it possible to modify the schema after it is created?

1

Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
06:58 AM
No it's not possible, but this is a very frequently asked feature that we plan to support soon. I presume you want to add faceting to a field previously not enabled for?
06:59
Kishore Nallan
06:59 AM
We want to support that and as well adding new fields in the document to the schema which was not added at collection creation time.
Sai
Photo of md5-6c1f32ee79d1166e54e3f17345b8d814
Sai
07:07 AM
oh great, any timelines on these?
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
07:08 AM
4-6 weeks is the upper bound.
Sai
Photo of md5-6c1f32ee79d1166e54e3f17345b8d814
Sai
07:10 AM
great !!
07:11
Sai
07:11 AM
also one more thing , i guess its not possible to insert a JSON field? and query upon nested json . are you planning to support the same?
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
07:12 AM
This is again on our backlog (https://github.com/typesense/typesense/issues/227).

However, this is not yet prioritized because it's likely to be a very involved change and also there exists a work around (manual flattening and unflattening) which atleast makes the issue manageable, even if somewhat inconvenient.

1

Sai
Photo of md5-6c1f32ee79d1166e54e3f17345b8d814
Sai
07:18 AM
one weird thing im facing is that
when i query_by [‘title’,‘body’] and that word lets say “typesense” is only part of title and not part of any body throughout it does not return me any document .
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
07:20 AM
If you can produce a reproduceable code snippet with a sample dataset then I can take a look.

1