Skip to content

feat: Create and alias index #813

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

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

SoulPancake
Copy link
Contributor

No description provided.

@SoulPancake SoulPancake changed the title feat: Create and aliax index feat: Create and alias ndex Mar 26, 2025
@SoulPancake SoulPancake changed the title feat: Create and alias ndex feat: Create and alias index Mar 26, 2025
@rueian
Copy link
Collaborator

rueian commented Apr 4, 2025

Hi @SoulPancake, I just reviewed it again and left some comments. Could you also write some tests to demonstrate how a user can use this feature?

om/hash.go Outdated
var currentIndex string
infoCmd := r.client.B().FtInfo().Index(alias).Build()
infoResp, err := r.client.Do(ctx, infoCmd).ToMap()
aliasExists := err == nil
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What will be the error returned when the index does not exist? Will it be a redis Nil? I think we should return early here if the err is caused by other reasons, such as network failures.

@SoulPancake
Copy link
Contributor Author

Hi @rueian Apologies for the huge delay
Can you take a look at this?

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

Successfully merging this pull request may close these issues.

2 participants