xapian-full-alaveteli gem replaced with ruby-xapian package

This commit is contained in:
Karel Picman 2017-09-12 08:53:39 +02:00
parent 89b18c1df3
commit 3abd32e058
4 changed files with 25 additions and 22 deletions

View File

@ -4,15 +4,20 @@ Changelog for Redmine DMSF
1.6.0 *2017-09-04*
------------------
IMPORTANT
Folder permissions
Documents attachable to issues
Hungarian localisation
Fulltext search in *.eml and *.msg
1. Files in the filesystem are re-organized by a new system based on dates.
IMPORTANT
1. Files in the filesystem are re-organized by a new system based on dates. So, documents are not stored in folders named
by the project's identifier but by the data of uploading, e.g. 2017/09. It's the same system used by Redmine for
attachments.
2. DMS storage directory plugin option is related to the rails root directory.
3. The plugin is independent of the gem xapian-full-alaveteli which has been replaced with ruby-xapian package. Therefore
is recommended to uninstall xapian-full-alaveteli gem and install ruby-xapian package in order the full-text search
is working.
* Bug: #758 - Error in template when retrieving details of a file in a subfolder
* New: #755 - Ability to retrieve the MD5 value of a Document type

View File

@ -28,9 +28,4 @@ gem 'simple_enum'
gem 'uuidtools'
gem 'dav4rack'
gem 'dalli'
group :xapian do
gem 'xapian-full-alaveteli', :require => false
end
gem 'redmine_extensions' unless Dir.exist?(File.expand_path('../../easyproject', __FILE__))

View File

@ -38,7 +38,7 @@ Features
* Document tagging
* Trash bin
* Documents attachable to issues
* Compatible with Redmine 3.3.x
* Compatible with Redmine 3.4.x
Dependencies
------------
@ -47,11 +47,12 @@ Dependencies
### Full-text search (optional)
If you want to use fulltext search abilities, install xapian-core, omega and xapian-bindings from
https://xapian.org/download or install xapian-omega package from your Linux distribution repositories.
If you want to use fulltext search abilities, install xapian-omega and ruby-xapian packages. See https://xapian.org
for details.
As of xapian-full-alaveteli (1.2.21.1), the latest working version of Xapian installed in the system is 1.2.24. Later
versions give an error: "REDMAIN_XAPIAN ERROR: Xapian database is not properly set, initiated or it's corrupted"
```
sudo apt-get install xapian-omega ruby-xapian
```
To index some files with omega you may have to install some other packages like
xpdf, antiword, ...
@ -294,12 +295,13 @@ Before installing ensure that the Redmine instance is stopped.
### Fulltext search (optional)
If you want to use full-text search features, you must setup file content indexing.
It is necessary to index DMSF files with omega before searching attempts to receive some output:
It is necessary to index DMSF files with omindex before searching attempts to receive some output:
1. Change the configuration part of redmine_dmsf/extra/xapian_indexer.rb file according to your environment.
2. Run `ruby redmine_dmsf/extra/xapian_indexer.rb -f`
(The path to the index database set in xapian_indexer.rb must corresponds to the path set in the plugin's settings.)
2. Run `ruby redmine_dmsf/extra/xapian_indexer.rb -vf`
This command must be run on regular basis (e.g. from cron)
This command should be run on regular basis (e.g. from cron)
Example of cron job (once per hour at 8th minute):

View File

@ -23,7 +23,8 @@ begin
require 'xapian'
$xapian_bindings_available = true
rescue LoadError
Rails.logger.info 'REDMAIN_XAPIAN ERROR: No Ruby bindings for Xapian installed !!. PLEASE install Xapian search engine interface for Ruby.'
Rails.logger.warn %{No Xapian search engine interface for Ruby installed => Full-text search won't be available.
Install a ruby-xapian package or an alternative Xapian binding (https://xapian.org).}
$xapian_bindings_available = false
end
@ -320,8 +321,8 @@ class DmsfFile < ActiveRecord::Base
Setting.plugin_redmine_dmsf['dmsf_index_database'].strip, lang)
database = Xapian::Database.new(databasepath)
rescue Exception => e
Rails.logger.warn "REDMAIN_XAPIAN ERROR: Xapian database is not properly set, initiated or it's corrupted."
Rails.logger.warn e.message
Rails.logger.error "REDMINE_XAPIAN ERROR: Xapian database is not properly set, initiated or it's corrupted."
Rails.logger.error e.message
end
if database