Skip to content

Add support to override_tags #167

Open
@leapoly

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

Activity

leapalazzolo

leapalazzolo commented on Oct 21, 2024

@leapalazzolo

Same wrong behavior with:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Add support to override_tags · Issue #167 · typesense/typesense-go