typesense / typesense/typesense-go
Add support to override_tags
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 319
- Forks
- 73
- PR merge metrics
- No merged PRs in 30d
Description
Description
Typesense supports override_tags as we can see here https://typesense.org/docs/26.0/api/curation.html#add-tags-to-rules but it isn't supported here https://github.com/typesense/typesense-go/blob/master/typesense/api/types_gen.go#L586.
Steps to reproduce
override := &api.SearchOverrideSchema{
Rule: api.SearchOverrideRule{
Query: "apple",
Match: "exact",
},
Includes: []api.SearchOverrideInclude{
{
Id: "422",
Position: 1,
},
{
Id: "54",
Position: 2,
},
},
Excludes: []api.SearchOverrideExclude{
{
Id: "287",
},
},
}
client.Collection("companies").Overrides().Upsert(context.Background(), "customize-apple", override)
Expected Behavior
override := &api.SearchOverrideSchema{
Rule: api.SearchOverrideRule{
Query: "apple",
Match: "exact",
Tags: ["apple", "iphone"]
},
Includes: []api.SearchOverrideInclude{
{
Id: "422",
Position: 1,
},
{
Id: "54",
Position: 2,
},
},
Excludes: []api.SearchOverrideExclude{
{
Id: "287",
},
},
}
client.Collection("companies").Overrides().Upsert(context.Background(), "customize-apple", override)
Actual Behavior
The tags are omitted.
Metadata
Typesense Version: 1.1.0
OS: Mac
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in typesense/api/types_gen.go around line 586 and inspect the SearchOverrideRule definition and the override Upsert path. Compare the supported override_tags documentation with the generated Go fields, then verify that the tags are serialized when creating an override. Done means callers can provide tags and the resulting request includes them.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api, search
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100