Questions tagged [unaccent]

10 questions
6
votes
1 answer

'ERROR: text search dictionary "unaccent" does not exist' during CREATE INDEX?

I'm running PostgreSQL 9.3 on Mac OS X Yosemite. I try to create an unaccent lowercase trigram index. To achieve it I did this: mydb=# CREATE EXTENSION pg_trgm SCHEMA public VERSION "1.1"; CREATE EXTENSION unaccent SCHEMA public; …
6
votes
1 answer

Creating a case-insensitive and accent/diacritics insensitive search on a field

I would like to know if it makes sense to create an index combining two functions while using Full Text Search: lower(name) and f_unaccent(name) Where f_unaccent is just my wrapper to make unaccent function immutable. I do have an index working on:…
5
votes
2 answers

Postgres full text search with unaccent and inflection (conjugation, etc.)

I want to be able to search unaccented phrases in an inflected (Polish) language in Postgres. Say, if a document contains robiłem, the lexeme should be robić (the infinivite). Its forms are robię, robił, robiła and so on. I want to be able to find…
Tomek
  • 51
  • 1
  • 2
3
votes
1 answer

Error during pg_restore: text search dictionary "unaccent" does not exist

I'm trying to move data between servers. I recreated the whole database structure, checked that same users exist and the unaccent extension that we use is enabled for all schemas of the target database. When I try to run: pg_restore -h %server_host%…
jezzarax
  • 181
  • 7
3
votes
3 answers

How to query efficiently from Postgres to select special words?

Let's say that I have a table called words with very many records. Columns are id and name. In the words table I have for example: 'systematic', 'سلام','gear','synthesis','mysterious', etc. NB: we have utf8 words, too. How to query efficiently…
Alireza
  • 3,526
  • 10
  • 34
  • 41
3
votes
1 answer

Trigram similarity (pg_trgm) with German umlauts

I try to figure out how to improve Postgres 10.6 pg_trgm queries with German umlauts (äöü). In german 'ö' can be written as 'oe'. But beware: not every 'oe' can be written as 'ö'. CREATE TABLE public.names (name text COLLATE…
2
votes
1 answer

'text search dictionary "unaccent" does not exist' entries in postgres log, supposedly during automatic analyze

I have many such entries in the postgresql main log, ever since upgrading to Postgres 10: 2018-03-28 08:51:00.281 CEST [97547] ERROR: text search dictionary "unaccent" does not exist 2018-03-28 08:51:00.281 CEST [97547] CONTEXT: automatic analyze…
P.Péter
  • 771
  • 1
  • 6
  • 19
2
votes
1 answer

Custom unaccent rules in heroku

We have an application running in heroku and we want to add a search feature on a field that contains greek characters and we want to make it accent agnostic. So the idea is to use postgresql's unaccent functionality. The problem is that by default…
2
votes
1 answer

PostgreSQL translate special characters?

Description: PostgreSQL 9.3 String: 'ì ằ ú ề' Desired Result: 'i a u e' My code: select translate ('ì ằ ú ề', 'ìằúề', 'iaue') ; -- it works. Result: i a u e Question: If I use it this way, I have to define a manual translation between 'ìằúề' and…
Luan Huynh
  • 1,742
  • 4
  • 20
  • 31
1
vote
3 answers

How to speed up string cleanup function?

I need to cleanup a string, so that certain ASCII code characters are left out of the string, and others are replaced. I am new to Postgres. My function ufn_cie_easy() performs way too slow: DECLARE letter char = ''; str_result TEXT = ''; x…