#random

Resetting Inferred Value in Schema

TLDR Yoshi asked how to reset an inferred value in a schema. Jason recommended creating a new collection with the updated definition for large datasets or modifying an existing field for smaller ones.

Powered by Struct AI
2
4mo
Solved
Join the chat
May 18, 2023 (4 months ago)
Yoshi
Photo of md5-9e27fed7af6568f2c8abff36e7e9da4d
Yoshi
11:29 PM
Once a value has been inferred from an object type in schema, is there any way to reset it? I have a field that was inferred as text, but I want to change it to an int.
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
11:58 PM
For large datasets, it’s best to create a new collection with the updated definition for that field and reimport the documents.

For small (say 500K or less), you can change the inferred definitions this way: https://typesense.org/docs/0.24.1/api/collections.html#modifying-an-existing-field