Comments (9)
Could you try this patch?
diff --git a/db/migrate/20170630063657_create_searcher_records.rb b/db/migrate/20170630063657_create_searcher_records.rb
index 4a8ed49..ce47d3b 100644
--- a/db/migrate/20170630063657_create_searcher_records.rb
+++ b/db/migrate/20170630063657_create_searcher_records.rb
@@ -213,7 +213,7 @@ class CreateSearcherRecords < ActiveRecord::Migration
sql_rest = <<-SQL
JOIN issues AS i ON (base.customized_id = i.id)
JOIN custom_fields AS f ON (base.custom_field_id = f.id)
- JOIN custom_fields_projects AS r ON (base.custom_field_id = r.custom_field_id)
+ JOIN custom_fields_projects AS r ON (base.custom_field_id = r.custom_field_id AND r.project_id = i.project_id)
SQL
sql = "#{sql_base} #{sql_rest} WHERE searchable = true;"
execute(sql)
@@ -225,7 +225,6 @@ class CreateSearcherRecords < ActiveRecord::Migration
sql_rest = <<-SQL
JOIN projects AS p ON (base.customized_id = p.id)
JOIN custom_fields AS f ON (base.custom_field_id = f.id)
- JOIN custom_fields_projects AS r ON (base.custom_field_id = r.custom_field_id)
SQL
sql = "#{sql_base} #{sql_rest} WHERE searchable = true;"
execute(sql)
from redmine_full_text_search.
@okkez Thank you for quick reply.
Is the 2nd chunk of the diff correct? I got Unknown column 'r.project_id' in 'field list':
error.
Should it be similar to the 1st chunk?
from redmine_full_text_search.
How about this?
We don't need to join custom_fields_projects
when handle projects' custom_values
. But we need project_id here.
diff --git a/db/migrate/20170630063657_create_searcher_records.rb b/db/migrate/20170630063657_create_searcher_records.rb
index 4a8ed49..2a5386f 100644
--- a/db/migrate/20170630063657_create_searcher_records.rb
+++ b/db/migrate/20170630063657_create_searcher_records.rb
@@ -213,19 +213,18 @@ class CreateSearcherRecords < ActiveRecord::Migration
sql_rest = <<-SQL
JOIN issues AS i ON (base.customized_id = i.id)
JOIN custom_fields AS f ON (base.custom_field_id = f.id)
- JOIN custom_fields_projects AS r ON (base.custom_field_id = r.custom_field_id)
+ JOIN custom_fields_projects AS r ON (base.custom_field_id = r.custom_field_id AND r.project_id = i.project_id)
SQL
sql = "#{sql_base} #{sql_rest} WHERE searchable = true;"
execute(sql)
sql_base = <<-SQL
INSERT INTO searcher_records(original_id, original_type, project_id, original_created_on, original_updated_on, #{columns.join(", ")})
- SELECT base.id, '#{table.classify}', r.project_id, #{transform(original_columns)} FROM #{table} AS base
+ SELECT base.id, '#{table.classify}', p.id, #{transform(original_columns)} FROM #{table} AS base
SQL
sql_rest = <<-SQL
JOIN projects AS p ON (base.customized_id = p.id)
JOIN custom_fields AS f ON (base.custom_field_id = f.id)
- JOIN custom_fields_projects AS r ON (base.custom_field_id = r.custom_field_id)
SQL
sql = "#{sql_base} #{sql_rest} WHERE searchable = true;"
execute(sql)
from redmine_full_text_search.
With the patch, the migration process was finished without error.
However, I got undefined method `display_score?'
error when trying to open issue page.
I will check it and file new issue if necessary.
Thanks.
from redmine_full_text_search.
Thank you for confirmation.
from redmine_full_text_search.
For the record, it turns out undefined method `display_score?'
happened when using both Full text search and redmine_persist_wfmt.
So it might not be problem of Full text search, although I don't know how the problem happens.
from redmine_full_text_search.
Thank you for reporting. I will investigate the issue later.
from redmine_full_text_search.
@iquiw I've tried to install redmine_persist_wfmt. But it does not support recent Redmine, I think.
from redmine_full_text_search.
@okkez I see. Thank you for trying!
Unfortunately, the plugin is required for my use case.
I will try to find workaround or consider to give it up.
from redmine_full_text_search.
Related Issues (20)
- ActiveRecord::RecordNotFound (Couldn't find FullTextSearch::TagType with 'id'=0) HOT 3
- migrate error on pgroonga HOT 3
- インストールしようとするとデータベース(Mroonga)のマイグレーションに失敗する HOT 2
- redmine 5.0.2 ruby 3.1.2 HOT 3
- fts_targets records of custom field is not deleted when Issue is deleted HOT 2
- 削除したカスタムフィールドの単語を検索時、エラー HOT 5
- Thinking of OpenAI HOT 1
- データ同期でエラー HOT 11
- 検索結果のソートにチケット番号を追加してほしい HOT 42
- Redmine 5.1 isn't supported HOT 16
- Add support for fuzzy search
- Add test cases for order by last modified time or score HOT 1
- Support for Redmine master with Rails version 7 HOT 2
- Syntax error may be happen
- Asynchronous job for data update
- Search for "rms" results in a 500 error HOT 1
- Exceeds PostgreSQL index size limit HOT 4
- Error on Rails6 HOT 5
- Search Knowledgebase articles HOT 4
- Proposal to improve database recovery procedure HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from redmine_full_text_search.