Hi Team:wave: I'm indexing documents from Laserfi...
# community-help
v
Hi Team๐Ÿ‘‹ I'm indexing documents from Laserfiche, and the fields are dynamically created during ingestion based on document metadata. I'm relying on Typesense's auto-schema creation feature. Is there a way to automatically set
sort: true
for all dynamically created fields of type
string
or
number
, at the time of indexing โ€” without manually updating the schema afterward? Since field names and types vary per document, defining the schema in advance isnโ€™t practical. Any way to tell Typesense to default to
sort: true
for eligible fields during auto-schema creation? Thanks!
k
You can have a field name that contains a regexp like this:
Copy code
"name": ".*_str",
"sort": true
Then you have to make sure any field name that must use this rule to end with
_str
. Note: sort index on string fields can consume a lot of memory so you've to watch out for that for large datasets.
๐Ÿ‘ 1