clear-code / redmine_full_text_search

Full text search for Redmine
MIT License
61 stars 24 forks source link

migrate error on pgroonga #102

Closed makeneko closed 2 years ago

makeneko commented 2 years ago

Hi,

I tried to upgrade redmine and full text search. An error occurs when db migrate.

"tag_ids" is integer[] but not support in pgroonga?

Environments:

OS:                           ubuntu 20.04.3
Redmine:                  4.2.3
full text search:          v1.0.3

Rails version             5.2.6
Ruby version              2.7.0-p0 (x86_64-linux-gnu)
RubyGems version          3.1.2
Rack version              2.2.3
Database adapter          postgresql

Errors:

...
== 20190603061606 CreateFtsTargets: migrating =================================
...
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:

PG::UndefinedObject: ERROR:  data type integer[] has no default operator class for access method "pgroonga"
HINT:  You must specify an operator class for the index or define a default operator class for the data type.
: CREATE  INDEX  "fts_targets_index_pgroonga" ON "fts_targets" USING PGroonga ("id", "source_id", "source_type_id", "project_id", "container_id", "container_type_id", "custom_field_id", "is_private", "last_modified_at", "title", "content", "tag_ids") WITH (normalizer = 'NormalizerNFKC121')
...
var/lib/redmine-4.2.3/plugins/full_text_search/db/migrate/20190603061606_create_fts_targets.rb:26:in `change'

postgresql and extension version:

$ psql --version
psql (PostgreSQL) 12.9 (Ubuntu 12.9-0ubuntu0.20.04.1)

redmine=# SELECT *                        
FROM pg_extension;
 extname  | extowner | extnamespace | extrelocatable | extversion | extconfig | extcondition 
----------+----------+--------------+----------------+------------+-----------+--------------
 plpgsql  |       10 |           11 | f              | 1.0        |           | 
 pgroonga |       10 |         2200 | f              | 2.1.8      |           | 
(2 rows)

Thanks

kou commented 2 years ago

Could you try with the latest PGroonga again?

kou commented 2 years ago

No response.

makeneko commented 2 years ago

I tried with the latest pgroonga, but no change. I gave up thanks