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

Enabling Exact Match Search in Existing Redisearch Schema Using redisearch-go #191

Open
Li-Khan opened this issue May 3, 2024 · 0 comments

Comments

@Li-Khan
Copy link

Li-Khan commented May 3, 2024

Hello, I've been exploring the capabilities of redisearch-go for integrating Redisearch into my Go applications, and I came across an interesting feature mentioned in the Redisearch GitHub discussions regarding aliasing fields during index creation.

In a GitHub issue discussion 1130, a user brought up the need for being able to perform exact match searches on text fields without tokenization, similar to SQL's WHERE clause functionality. The proposed solution involved creating an alias for the text field during index creation to enable different indexing strategies for the same field.

Here's an example of how this was achieved in Redisearch:

FT.CREATE idx1 NOHL NOFREQS SCHEMA f1 AS f1_text TEXT NOSTEM f1 AS f1_tag TAG

This syntax allowed for the creation of two representations of the same field "f1": one for full-text search (f1_text) and another for exact match search (f1_tag).

My question is whether it's possible to achieve a similar behavior in redisearch-go without modifying the index schema during creation. Specifically, I already have an existing schema in place, and I would like to add a new field with similar aliasing functionality as demonstrated above without recreating the entire schema.

Is there a way to accomplish this programmatically using redisearch-go, or would it require a modification to the library itself?

Any insights or suggestions would be greatly appreciated.

Thank you!

@Li-Khan Li-Khan changed the title Adding Fields to Existing Schema in redisearch-go Enabling Exact Match Search in Existing Redisearch Schema Using redisearch-go May 3, 2024
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

1 participant