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

feat(search): allow database fulltext index using custom parser #7074

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Mmx233
Copy link
Contributor

@Mmx233 Mmx233 commented Aug 24, 2024

The Ngram Parser can be used directly in MySQL 8.0 and above. In addition, both MySQL and Postgres can utilize various plugins to enhance tokenization for different languages.

This PR adds field Parser string `json:"parser" env:"PARSER"` in conf.Conf.Database to allow admin custom parser for database fulltext index. Although only system admin can set this setting via the config file or environment variables, I want to make it clear that this field is not SQL safe and could be used to implement SQL injection.

The changes in this PR have tested in:

Tested Database Parser Docker Image
🔳 Mysql ngram
🔳 Postgres

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

Successfully merging this pull request may close these issues.

1 participant