-
Notifications
You must be signed in to change notification settings - Fork 15
Typesense derive enhancements #59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I thought it's supposed to wrap. Because there are optional fields possible, no? How else would you update a field and set it to null? That needs to be added to tests. |
|
Attributes |
Yes, you're right. I have reverted the change and added test for it. |
|
I have found myself deep into optimizations. I guess I better will open a separate PR. Is this one ready to merge? |
|
Yes, it's ready |
Change Summary
This PR added support for more attributes:
Collection-level attributes
Added support for
token_separatorsandsymbols_to_index:Field-level attributes
sort,index,store,infix,stem,range_index,optionallocale,vec_dist,num_dimtype: override the auto inferred typerename: rename a Typesense field (This must be used with#[serde(rename = "new_name")])flatten: generate schema for fields of nested structsskip: skip generating schema for a fieldBoolean attributes can be specified as a shorthand flag e.g.
#[typesense(index)]or explicitly set a value e.g.#[typesense(index = false)])Full example:
Bug fix
This PR also fixed the partial struct derive wrapping an already-optional field in an
Option<>