Releases: typesense/typesense-go
Releases · typesense/typesense-go
v3.2.0
What's Changed
- gen types, fixed for
num_tokens_dropped: #194 by @haydenhoang in #196 - copy body over request retries in a multi-node request by @haydenhoang in #197
Full Changelog: v3.1.0...v3.2.0
v3.1.0
v3.0.0
What's Changed
- [Breaking Change]
MultiSearchCollectionParameters.collectionis now optional. Fixed issue #168.
searches := api.MultiSearchSearchesParameter{
Searches: []api.MultiSearchCollectionParameters{
{
Q: pointer.String("Company"),
// before
// Collection: "companies",
Collection: pointer.Any("companies"),
},
},
}- [Breaking Change] Single document index methods now include an additional parameter to specify dirty values behavior.
client.Collection("companies").Documents().Create(context.Background(), document, &api.DocumentIndexParameters{DirtyValues: pointer.Any(api.CoerceOrDrop)})
client.Collection("companies").Documents().Upsert(context.Background(), document, &api.DocumentIndexParameters{DirtyValues: pointer.Any(api.CoerceOrDrop)})
client.Collection("companies").Document("123").Update(context.Background(), document, &api.DocumentIndexParameters{DirtyValues: pointer.Any(api.CoerceOrDrop)})- [Breaking Change] An additional parameter
*api.ExportDocumentsParamsallows control over export results.
client.Collection("companies").Documents().Export(context.Background(), &api.ExportDocumentsParams{
FilterBy: pointer.String("num_employees>:1000"),
IncludeFields: pointer.String("name"),
ExcludeFields: pointer.String("year"),
})- [Breaking Change] The import
Actiontype is now an enum instead of*string.
&api.ImportDocumentsParams{
// Action: pointer.String("create"),
Action: pointer.Any(api.Create),
}- [Breaking Change] The
QueryandMatchfields in override rules are now optional.
api.SearchOverrideRule{
// before
// Query: "apple",
// Match: "exact",
Query: pointer.String("apple"),
Match: pointer.Any(api.Exact),
}- [Breaking Change]
SearchParametersfieldsQandQueryByare now optional.
preset := &api.PresetUpsertSchema{}
preset.Value.FromSearchParameters(api.SearchParameters{
Q: pointer.Any("company"),
QueryBy: pointer.String("name"),
})Features:
- Added Analytics and Conversation APIs, updated override and search parameters.
- Allowed embedding of separate API keys for each search in multi-search.
- Added a generic
pointer.Any()helper function that converts any type into a pointer. This is especially useful for parameters of enum types.
// before
var upsertAction api.IndexDocumentParamsAction = "upsert"
&api.IndexDocumentParams{
Action: &upsertAction,
}
// after
&api.IndexDocumentParams{
Action: pointer.Any(api.Upsert),
}Fixes:
- Fixed issue #147.
- Fixed issue #189.
v2.0.0
v1.1.0
- Add generics support (document operations are now optionally [typed](https://github.com/typesense/typesense-go?tab=readme-ov- file#typed-document-operations))
- Bump oapi-codegen to v2
- Run mockgen and oapi-codegen via go run
- Pull latest api changes
v1.0.0
v1.0
There is a breaking change in the client interface that warranted a major version release: