Skip to content
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

Add support to override_tags #167

Open
leapoly opened this issue Jun 18, 2024 · 1 comment
Open

Add support to override_tags #167

leapoly opened this issue Jun 18, 2024 · 1 comment

Comments

@leapoly
Copy link

leapoly commented Jun 18, 2024

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

@leapalazzolo
Copy link

Same wrong behavior with:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants