Wiki: Search with Postgres DB generate "An expected error occurred"

Created on 10 Jul 2019  路  3Comments  路  Source: Requarks/wiki

Describe the bug
Searching in wikijs returns "An expected error occurred".
Is "expected" the correct word?!
In docker logs:

2019-07-10T09:42:39.456Z [MASTER] warn: Search Engine Error:
2019-07-10T09:42:39.456Z [MASTER] warn: SELECT word, word <-> $1 AS rank FROM "pagesWords" WHERE similarity(word, $2) > 0.2 ORDER BY rank LIMIT 5; - operator does not exist: text <-> unknown

To Reproduce
Steps to reproduce the behavior:
1.Search in the wiki

  1. Use postgress

Expected behavior
Find results

Screenshots
image

Host Info (please complete the following information):

Additional context
Quite fresh, some page, LDAP configuration. Nothing else.

under review

Most helpful comment

Postgres search needs the pg_trgm extension. So you have to enable it first in your database:

CREATE EXTENSION pg_trgm;

I think this is something for the docs.

Then the search does something at least, but I think it is still not fully operational (#917).

All 3 comments

Postgres search needs the pg_trgm extension. So you have to enable it first in your database:

CREATE EXTENSION pg_trgm;

I think this is something for the docs.

Then the search does something at least, but I think it is still not fully operational (#917).

I was having the same issue. I added the extension suggested above and it fixed the issue for me.

Note: the module may need to be installed first, see https://dba.stackexchange.com/a/165301/131248

Was this page helpful?
0 / 5 - 0 ratings