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

Unaccent function example #490

Open
brunoprietog opened this issue Aug 16, 2022 · 0 comments
Open

Unaccent function example #490

brunoprietog opened this issue Aug 16, 2022 · 0 comments

Comments

@brunoprietog
Copy link

Hi, thanks for this amazing gem!

I want to create indexes to improve the speed of searches, but I read in the readme that by using the unaccent extension you can not use the function that gives the default extension.

"Advanced users may wish to add indexes for the expressions that pg_search generates. Unfortunately, the unaccent function supplied by this extension is not indexable (as of PostgreSQL 9.1). Thus, you may want to write your own wrapper function and use it instead. This can be configured by calling the following code, perhaps in an initializer."

PgSearch.unaccent_function = "my_unaccent"

Then I have to make a wrapper function, but it is not clear to me how this could be.

I imagine that it is necessary to execute some migration that creates a function? How would that be? Is it necessary to change the schema to SQL?

Maybe it would also be good to add an example to the readme or to the wiki.

Does this limitation still exist in Postgres 14?

Thanks!

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