Restream / redmine_elasticsearch

Full text searching plugin for Redmine
Apache License 2.0
68 stars 33 forks source link

Can't initiate a reindex on redmine 3.1.1 #35

Open ademma-systran opened 9 years ago

ademma-systran commented 9 years ago

On redmine 3.1.1, I have the following trace when trying to initiate a reindex :

[root@redmine redmine]# bundle exec rake redmine_elasticsearch:reindex_all RAILS_ENV=production --trace
Loading Rails environment for Resque
** Invoke redmine_elasticsearch:reindex_all (first_time)
** Invoke redmine_elasticsearch:logged (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute redmine_elasticsearch:logged
** Execute redmine_elasticsearch:reindex_all
Recreate index for all available search types
rake aborted!
RedmineElasticsearch::IndexerError: Can't create index:
{"error":{"root_cause":[{"type":"mapper_parsing_exception","reason":"Mapping definition for [id] has unsupported parameters:  [index_name : project_id] [not_analyzed : true]"}],"type":"mapper_parsing_exception","reason":"mapping [parent_project]","caused_by":{"type":"mapper_parsing_exception","reason":"Mapping definition for [id] has unsupported parameters:  [index_name : project_id] [not_analyzed : true]"}},"status":400}
/home/redmine-3.1.1/plugins/redmine_elasticsearch/lib/redmine_elasticsearch/indexer_service.rb:74:in `create_index'
/home/redmine-3.1.1/plugins/redmine_elasticsearch/lib/redmine_elasticsearch/indexer_service.rb:12:in `recreate_index'
/home/redmine-3.1.1/plugins/redmine_elasticsearch/lib/redmine_elasticsearch/indexer_service.rb:17:in `reindex_all'
/home/redmine-3.1.1/plugins/redmine_elasticsearch/lib/tasks/index.rake:18:in `block (2 levels) in <top (required)>'
/usr/local/rvm/gems/ruby-2.1.0/gems/rake-10.4.2/lib/rake/task.rb:240:in `call'
/usr/local/rvm/gems/ruby-2.1.0/gems/rake-10.4.2/lib/rake/task.rb:240:in `block in execute'
/usr/local/rvm/gems/ruby-2.1.0/gems/rake-10.4.2/lib/rake/task.rb:235:in `each'
/usr/local/rvm/gems/ruby-2.1.0/gems/rake-10.4.2/lib/rake/task.rb:235:in `execute'
/usr/local/rvm/gems/ruby-2.1.0/gems/rake-10.4.2/lib/rake/task.rb:179:in `block in invoke_with_call_chain'
/usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
/usr/local/rvm/gems/ruby-2.1.0/gems/rake-10.4.2/lib/rake/task.rb:172:in `invoke_with_call_chain'
/usr/local/rvm/gems/ruby-2.1.0/gems/rake-10.4.2/lib/rake/task.rb:165:in `invoke'
/usr/local/rvm/gems/ruby-2.1.0/gems/rake-10.4.2/lib/rake/application.rb:150:in `invoke_task'
/usr/local/rvm/gems/ruby-2.1.0/gems/rake-10.4.2/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/usr/local/rvm/gems/ruby-2.1.0/gems/rake-10.4.2/lib/rake/application.rb:106:in `each'
/usr/local/rvm/gems/ruby-2.1.0/gems/rake-10.4.2/lib/rake/application.rb:106:in `block in top_level'
/usr/local/rvm/gems/ruby-2.1.0/gems/rake-10.4.2/lib/rake/application.rb:115:in `run_with_threads'
/usr/local/rvm/gems/ruby-2.1.0/gems/rake-10.4.2/lib/rake/application.rb:100:in `top_level'
/usr/local/rvm/gems/ruby-2.1.0/gems/rake-10.4.2/lib/rake/application.rb:78:in `block in run'
/usr/local/rvm/gems/ruby-2.1.0/gems/rake-10.4.2/lib/rake/application.rb:176:in `standard_exception_handling'
/usr/local/rvm/gems/ruby-2.1.0/gems/rake-10.4.2/lib/rake/application.rb:75:in `run'
/usr/local/rvm/gems/ruby-2.1.0/gems/rake-10.4.2/bin/rake:33:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.1.0/bin/rake:23:in `load'
/usr/local/rvm/gems/ruby-2.1.0/bin/rake:23:in `<main>'
/usr/local/rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:in `eval'
/usr/local/rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => redmine_elasticsearch:reindex_all

Is this a compatibility problem with the version I am using?

Thanks,

ademma-systran commented 9 years ago

Related to ElasticSearch 2.0. It is working with ElasticSearch 1.7.3. Probably linked to : https://www.elastic.co/guide/en/elasticsearch/reference/2.0/breaking_20_mapping_changes.html#_literal_index_name_literal_and_literal_path_literal_removed

pirxthepilot commented 8 years ago

This has been the case for me as well, on Redmine 3.2.0. Seems to work with Elasticsearch 1.7.4.