Closed tanmoyrsc closed 6 years ago
There might be several reasons for that. Unfortunately information you have provided are not enough.
Hi Picman,
Now in /var/tmp/dmsf_index location below folders has been created,
drwxrwxr-x 2 ubuntu ubuntu 4096 Jan 18 17:39 english/ drwxrwxr-x 2 ubuntu ubuntu 4096 Jan 18 17:45 french/ drwxrwxr-x 2 ubuntu ubuntu 4096 Jan 18 17:45 repodb/ in the above folders repodb/ is blank, and below is the details of other 2 folders, ubuntu@redmine:/var/tmp/dmsf_index$ ll english/ total 469360 drwxrwxr-x 2 ubuntu ubuntu 4096 Jan 18 17:39 ./ drwxrwxr-x 5 ubuntu ubuntu 4096 Jan 18 17:45 ../ -rw-rw-r-- 1 ubuntu ubuntu 0 Jan 18 17:33 flintlock -rw-rw-r-- 1 ubuntu ubuntu 28 Jan 18 17:33 iamchert -rw-rw-r-- 1 ubuntu ubuntu 13 Jan 18 17:33 position.baseA -rw-rw-r-- 1 ubuntu ubuntu 3371 Jan 18 17:39 position.baseB -rw-rw-r-- 1 ubuntu ubuntu 219586560 Jan 18 17:39 position.DB -rw-rw-r-- 1 ubuntu ubuntu 13 Jan 18 17:33 postlist.baseA -rw-rw-r-- 1 ubuntu ubuntu 3407 Jan 18 17:39 postlist.baseB -rw-rw-r-- 1 ubuntu ubuntu 221937664 Jan 18 17:39 postlist.DB -rw-rw-r-- 1 ubuntu ubuntu 13 Jan 18 17:33 record.baseA -rw-rw-r-- 1 ubuntu ubuntu 30 Jan 18 17:39 record.baseB -rw-rw-r-- 1 ubuntu ubuntu 991232 Jan 18 17:39 record.DB -rw-rw-r-- 1 ubuntu ubuntu 13 Jan 18 17:33 termlist.baseA -rw-rw-r-- 1 ubuntu ubuntu 598 Jan 18 17:39 termlist.baseB -rw-rw-r-- 1 ubuntu ubuntu 38060032 Jan 18 17:39 termlist.DB ubuntu@redmine:/var/tmp/dmsf_index$ ll french/ total 468732 drwxrwxr-x 2 ubuntu ubuntu 4096 Jan 18 17:45 ./ drwxrwxr-x 5 ubuntu ubuntu 4096 Jan 18 17:45 ../ -rw-rw-r-- 1 ubuntu ubuntu 0 Jan 18 17:39 flintlock -rw-rw-r-- 1 ubuntu ubuntu 28 Jan 18 17:39 iamchert -rw-rw-r-- 1 ubuntu ubuntu 13 Jan 18 17:39 position.baseA -rw-rw-r-- 1 ubuntu ubuntu 3371 Jan 18 17:45 position.baseB -rw-rw-r-- 1 ubuntu ubuntu 219586560 Jan 18 17:44 position.DB -rw-rw-r-- 1 ubuntu ubuntu 13 Jan 18 17:39 postlist.baseA -rw-rw-r-- 1 ubuntu ubuntu 3403 Jan 18 17:44 postlist.baseB -rw-rw-r-- 1 ubuntu ubuntu 221667328 Jan 18 17:44 postlist.DB -rw-rw-r-- 1 ubuntu ubuntu 13 Jan 18 17:39 record.baseA -rw-rw-r-- 1 ubuntu ubuntu 30 Jan 18 17:45 record.baseB -rw-rw-r-- 1 ubuntu ubuntu 991232 Jan 18 17:44 record.DB -rw-rw-r-- 1 ubuntu ubuntu 13 Jan 18 17:39 termlist.baseA -rw-rw-r-- 1 ubuntu ubuntu 592 Jan 18 17:45 termlist.baseB -rw-rw-r-- 1 ubuntu ubuntu 37683200 Jan 18 17:44 termlist.DB
Yes Search Titles Only check box unchecked. and xapian database location "/var/tmp/dmsf_index" has been updated both in redmine_xapian plugin and dmsf plugin configuration.
I have searched Key-word "Human Machine" and below is the result from production log, As per log Xapian search works perfectly and found the desire documents also, but on Redmine dashboard it shows 0 result found. below i have past the Production log, could you please help to sort this out.
XapianSearch::search
XapianSearch::xapian_search
Global settings dump {"enable"=>"true", "index_database"=>"/var/tmp/dmsf_index", "stemming_lang"=>"english", "stem_langs"=>["english", "french"], "stemming_strategy"=>"STEM_ALL", "save_search_scope"=>"true"}
stemming_lang: english
stemming_strategy: STEM_ALL
databasepath: /var/tmp/dmsf_index/english
query_string is: Human Machine
Parsed query is: Xapian::Query((human:(pos=1) AND (machine:(pos=2) SYNONYM machine :(pos=2) SYNONYM machine's:(pos=2) SYNONYM machine1:(pos=2) SYNONYM machine_batch:(pos=2) SYNONYM machine_tp:(pos=2) SYNONYM machineaddress:(pos=2) SYNONYM machinedev1:(pos=2) SYNONYM machinedev2:(pos=2) SYNONYM machinedev5:(pos=2) SYNONYM machines:(pos=2) SYNONYM machinesx000d:(pos=2))))
Matches 1-3 records:
Searching for attachments
^[[1m^[[36mAttachment Load (0.3ms)^[[0m ^[[1mSELECT attachments
. FROM attachments
WHERE attachments
.disk_filename
= '170725114635_5870_DAA_Portage.docx' ORDER BY attachments
.id
ASC LIMIT 1^[[0m
^[[1m^[[35mAttachment Load (0.3ms)^[[0m SELECT attachments
. FROM attachments
WHERE attachments
.disk_filename
= '170610114748_13_CONNX_13.0_Installation_Guide.pdf' ORDER BY attachments
.id
ASC LIMIT 1
^[[1m^[[36mAttachment Load (0.2ms)^[[0m ^[[1mSELECT attachments
. FROM attachments
WHERE attachments
.disk_filename
= '171110101335_6079_Basicat_Codes_Ref.xls' ORDER BY attachments
.id
ASC LIMIT 1^[[0m
Xapian searched
Call xapian search service for Attachment completed
^[[1m^[[35mSetting Load (0.2ms)^[[0m SELECT settings
. FROM settings
WHERE settings
.name
= 'search_results_per_page' ORDER BY settings
.id
DESC LIMIT 1
^[[1m^[[36mMember Exists (0.3ms)^[[0m ^[[1mSELECT 1 AS one FROM members
INNER JOIN projects
ON projects
.id
= members
.project_id
WHERE members
.user_id
= 1 AND (projects.status<>9) LIMIT 1^[[0m
Rendered plugins/redmine_xapian/app/views/search/index.html.erb within layouts/base (7.4ms)
^[[1m^[[35mSetting Load (0.2ms)^[[0m SELECT settings
. FROM settings
WHERE settings
.name
= 'app_title' ORDER BY settings
.id
DESC LIMIT 1
^[[1m^[[36mSetting Load (0.2ms)^[[0m ^[[1mSELECT settings
. FROM settings
WHERE settings
.name
= 'ui_theme' ORDER BY settings
.id
DESC LIMIT 1^[[0m
Rendered plugins/unread_issues/app/views/hooks/unread_isues/_add_css.html.erb (0.5ms)
Rendered plugins/clipboard_image_paste/app/views/clipboard_image_paste/_headers.html.erb (0.8ms)
^[[1m^[[35mSetting Load (0.4ms)^[[0m SELECT settings
. FROM settings
WHERE settings
.name
= 'gravatar_enabled' ORDER BY settings
.id
DESC LIMIT 1
^[[1m^[[36mAttachment Load (0.3ms)^[[0m ^[[1mSELECT attachments
. FROM attachments
WHERE attachments
.container_id
= 1 AND attachments
.container_type
= 'Principal' AND (attachments.description = 'avatar') LIMIT 1^[[0m
^[[1m^[[35mSetting Load (0.2ms)^[[0m SELECT settings
. FROM settings
WHERE settings
.name
= 'plugin_redmine_work_time' ORDER BY settings
.id
DESC LIMIT 1
^[[1m^[[36mSetting Load (0.2ms)^[[0m ^[[1mSELECT settings
. FROM settings
WHERE settings
.name
= 'plugin_unread_issues' ORDER BY settings
.id
DESC LIMIT 1^[[0m
^[[1m^[[35mSetting Load (0.2ms)^[[0m SELECT settings
. FROM settings
WHERE settings
.name
= 'plugin_redmine_contacts' ORDER BY settings
.id
DESC LIMIT 1
^[[1m^[[36mProject Load (0.5ms)^[[0m ^[[1mSELECT projects
. FROM projects
WHERE (projects.status <> 9 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='time_tracking'))^[[0m
^[[1m^[[35mProject Load (0.3ms)^[[0m SELECT projects
.id
, projects
.name
, projects
.identifier
, projects
.lft
, projects
.rgt
FROM projects
INNER JOIN members
ON projects
.id
= members
.project_id
WHERE members
.user_id
= 1 AND (projects.status<>9) AND projects
.status
= 1
^[[1m^[[36mWkAttendance Load (0.3ms)^[[0m ^[[1mselect a. from wk_attendances a inner join ( select max(start_time) as start_time,user_id from wk_attendances where user_id = 1 group by user_id ) vw on a.start_time = vw.start_time and a.user_id = vw.user_id order by a.start_time ^[[0m
Rendered plugins/redmine_wktime/app/views/wktime/_attendance_widget.html.erb (5.2ms)
Rendered plugins/redmine_contacts/app/views/common/_contacts_select2_data.html.erb (0.5ms)
^[[1m^[[35mTimeLogger Load (0.2ms)^[[0m SELECT time_loggers
. FROM time_loggers
WHERE time_loggers
.user_id
= 1 LIMIT 1
^[[1m^[[36mProject Load (0.2ms)^[[0m ^[[1mSELECT projects
. FROM projects
^[[0m
^[[1m^[[35m (0.2ms)^[[0m SELECT enabled_modules
.name
FROM enabled_modules
WHERE enabled_modules
.project_id
= 1
Rendered plugins/time_logger/app/views/time_loggers/_embed_menu.html.erb (3.9ms)
Rendered plugins/time_logger/app/views/time_loggers/_update_menu.html.erb (5.2ms)
^[[1m^[[36mSetting Load (0.2ms)^[[0m ^[[1mSELECT settings
. FROM settings
WHERE settings
.name
= 'attachment_max_size' ORDER BY settings
.id
DESC LIMIT 1^[[0m
Rendered plugins/clipboard_image_paste/app/views/clipboard_image_paste/_add_form.html.erb (4.2ms)
Rendered plugins/redmine_people/app/views/common/_people_select2_data.html.erb (0.4ms)
Br, Tanmoy
Hm, it seems to me that the following query returns no result. Can you check it in your database?
SELECT attachments.* FROM attachments WHERE attachments.disk_filename = '170725114635_5870_DAA_Portage.docx'
yes picman,
you are right! the query return empty set as below. but if I search with DAA then getting result.
mysql> SELECT attachments.* FROM attachments WHERE attachments.disk_filename = '170725114635_5870_DAA_Portage.docx'; Empty set (0.00 sec)
I don't understand. What is the right _diskfilename then?
I am surprised in disk the file "170725114635_5870_DAA_Portage.docx" exists but it is not listed in attachments table. and when I searched with some key of file name then it can find the file easily. but if i searched with some word from the content then it fails. i have paste the production log for searching the file with DAA and it gives the result. please check if you get any light.
Started GET "/redmine/search?utf8=%E2%9C%93&q=DAA" for 164.177.48.9 at 2018-01-19 14:07:33 +0100
Processing by SearchController#index as HTML
Parameters: {"utf8"=>"✓", "q"=>"DAA"}
SQL (2.3ms) UPDATE tokens
SET tokens
.updated_on
= '2018-01-19 14:07:33' WHERE tokens
.user_id
= 1 AND tokens
.value
= 'b2df332938226b97433a3b8e3e040244383f875b' AND tokens
.action
= 'session' AND (created_on > '2018-01-19 10:07:33.557405') AND (updated_on > '2018-01-19 13:07:33.557569')
(0.2ms) SELECT MAX(settings
.updated_on
) FROM settings
User Load (0.2ms) SELECT users
. FROM users
WHERE users
.type
IN ('User', 'AnonymousUser') AND users
.status
= 1 AND users
.id
= 1 LIMIT 1
Current user: admin (id=1)
(0.1ms) SELECT MAX(contacts_settings
.updated_on
) FROM contacts_settings
UserPreference Load (0.2ms) SELECT user_preferences
. FROM user_preferences
WHERE user_preferences
.user_id
= 1 LIMIT 1
(0.4ms) SELECT DISTINCT documents
.created_on
, documents
.id
FROM documents
INNER JOIN projects
ON projects
.id
= documents
.project_id
WHERE (projects.status <> 9 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='documents')) AND (((title LIKE '%DAA%') OR (documents.description LIKE '%DAA%'))) ORDER BY documents
.created_on
DESC, documents
.id
DESC
CustomField Load (0.2ms) SELECT custom_fields
. FROM custom_fields
WHERE custom_fields
.type
= 'DocumentCustomField' AND custom_fields
.searchable
= 1
DmsfFile Load (24.7ms) SELECT DISTINCT dmsf_files
. FROM dmsf_files
INNER JOIN dmsf_file_revisions
ON dmsf_file_revisions
.dmsf_file_id
= dmsf_files
.id
JOIN projects ON dmsf_files.container_id = projects.id AND dmsf_files.container_type = 'Project' WHERE dmsf_files
.deleted
= 0 AND (projects.status <> 9 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='dmsf')) AND (((LOWER(dmsf_files.name) LIKE '%daa%') OR (LOWER(dmsf_file_revisions.title) LIKE '%daa%') OR (LOWER(dmsf_file_revisions.description) LIKE '%daa%') OR (LOWER(dmsf_file_revisions.comment) LIKE '%daa%')))
Attachment::search
(0.8ms) SELECT DISTINCT attachments
.created_on
, attachments
.id
FROM attachments
JOIN issues ON attachments.container_id = issues.id JOIN projects ON issues.project_id = projects.id WHERE (attachments.container_type = 'Issue' AND projects.status = 1 AND projects.status <> 9 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='issue_tracking')) AND (((LOWER(attachments.filename) LIKE '%daa%') OR (LOWER(attachments.description) LIKE '%daa%')))
(0.3ms) SELECT DISTINCT attachments
.created_on
, attachments
.id
FROM attachments
JOIN messages ON attachments.container_id = messages.id JOIN boards ON boards.id = messages.board_id JOIN projects ON boards.project_id = projects.id WHERE (attachments.container_type = 'Message' AND projects.status = 1) AND (((LOWER(attachments.filename) LIKE '%daa%') OR (LOWER(attachments.description) LIKE '%daa%')))
(0.8ms) SELECT DISTINCT attachments
.created_on
, attachments
.id
FROM attachments
JOIN wiki_pages ON attachments.container_id = wiki_pages.id JOIN wikis ON wikis.id = wiki_pages.wiki_id JOIN projects ON wikis.project_id = projects.id WHERE (attachments.container_type = 'WikiPage' AND projects.status = 1 AND projects.status <> 9 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='wiki')) AND (((LOWER(attachments.filename) LIKE '%daa%') OR (LOWER(attachments.description) LIKE '%daa%')))
(0.6ms) SELECT DISTINCT attachments
.created_on
, attachments
.id
FROM attachments
JOIN projects ON projects.id = container_id WHERE (container_type = 'Project' AND projects.status = 1 AND projects.status <> 9 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='files')) AND (((LOWER(attachments.filename) LIKE '%daa%') OR (LOWER(attachments.description) LIKE '%daa%')))
Call xapian search service for Attachment
XapianSearch::search
XapianSearch::xapian_search
Global settings dump {"enable"=>"true", "index_database"=>"/var/tmp/dmsf_index", "stemming_lang"=>"english", "stem_langs"=>["english", "french"], "stemming_strategy"=>"STEM_ALL", "save_search_scope"=>"true"}
Call xapian search service for Attachment
XapianSearch::search
XapianSearch::xapian_search
Global settings dump {"enable"=>"true", "index_database"=>"/var/tmp/dmsf_index", "stemming_lang"=>"english", "stem_langs"=>["english", "french"], "stemming_strategy"=>"STEM_ALL", "save_search_scope"=>"true"}
stemming_lang: english
stemming_strategy: STEM_ALL
databasepath: /var/tmp/dmsf_index/english
query_string is: DAA
Parsed query is: Xapian::Query((daat:(pos=1) SYNONYM daaxfgure6bnvp:(pos=1)))
Matches 1-2 records:
Searching for attachments
Attachment Load (0.3ms) SELECT attachments
. FROM attachments
WHERE attachments
.disk_filename
= '171110101335_6079_Basicat_Codes_Ref.xls' ORDER BY attachments
.id
ASC LIMIT 1
Attachment Load (0.3ms) SELECT attachments
. FROM attachments
WHERE attachments
.disk_filename
= '170616232331_138_ADV__R_union_Fonct_Tech_GFI_1606__as_WebPage.mht' ORDER BY attachments
.id
ASC LIMIT 1
Xapian searched
Call xapian search service for Attachment completed
DmsfFile Load (0.2ms) SELECT dmsf_files
. FROM dmsf_files
WHERE dmsf_files
.id
= 5870
Member Exists (0.2ms) SELECT 1 AS one FROM members
INNER JOIN projects
ON projects
.id
= members
.project_id
WHERE members
.user_id
= 1 AND (projects.status<>9) LIMIT 1
Project Load (0.2ms) SELECT projects
. FROM projects
WHERE projects
.id
= 5 LIMIT 1
DmsfFileRevision Load (0.2ms) SELECT dmsf_file_revisions
. FROM dmsf_file_revisions
WHERE dmsf_file_revisions
.dmsf_file_id
= 5870 AND dmsf_file_revisions
.deleted
= 0 ORDER BY dmsf_file_revisions.id DESC LIMIT 1
Rendered plugins/redmine_xapian/app/views/search/index.html.erb within layouts/base (9.0ms)
Rendered plugins/unread_issues/app/views/hooks/unread_isues/_add_css.html.erb (0.1ms)
Rendered plugins/clipboard_image_paste/app/views/clipboard_image_paste/_headers.html.erb (0.4ms)
Attachment Load (0.4ms) SELECT attachments
. FROM attachments
WHERE attachments
.container_id
= 1 AND attachments
.container_type
= 'Principal' AND (attachments.description = 'avatar') LIMIT 1
Project Load (0.5ms) SELECT projects
. FROM projects
WHERE (projects.status <> 9 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='time_tracking'))
Project Load (0.3ms) SELECT projects
.id
, projects
.name
, projects
.identifier
, projects
.lft
, projects
.rgt
FROM projects
INNER JOIN members
ON projects
.id
= members
.project_id
WHERE members
.user_id
= 1 AND (projects.status<>9) AND projects
.status
= 1
WkAttendance Load (0.3ms) select a. from wk_attendances a inner join ( select max(start_time) as start_time,user_id from wk_attendances where user_id = 1 group by user_id ) vw on a.start_time = vw.start_time and a.user_id = vw.user_id order by a.start_time
Rendered plugins/redmine_wktime/app/views/wktime/_attendance_widget.html.erb (0.6ms)
Rendered plugins/redmine_contacts/app/views/common/_contacts_select2_data.html.erb (0.3ms)
TimeLogger Load (0.2ms) SELECT time_loggers
. FROM time_loggers
WHERE time_loggers
.user_id
= 1 LIMIT 1
Project Load (0.2ms) SELECT projects
. FROM projects
(0.2ms) SELECT enabled_modules
.name
FROM enabled_modules
WHERE enabled_modules
.project_id
= 1
Rendered plugins/time_logger/app/views/time_loggers/_embed_menu.html.erb (2.9ms)
Rendered plugins/time_logger/app/views/time_loggers/_update_menu.html.erb (3.3ms)
Rendered plugins/clipboard_image_paste/app/views/clipboard_image_paste/_add_form.html.erb (2.4ms)
Rendered plugins/redmine_people/app/views/common/_people_select2_data.html.erb (0.1ms)
Rendered plugins/redmine_people/app/views/common/_layout_bottom.html.erb (0.3ms)
Completed 200 OK in 79ms (Views: 30.9ms | ActiveRecord: 34.2ms)
Started GET "/redmine/people/avatar?id=73&size=80x80" for 164.177.48.9 at 2018-01-19 14:07:35 +0100
Processing by PeopleController#avatar as /
Parameters: {"id"=>"73", "size"=>"80x80"}
SQL (2.5ms) UPDATE tokens
SET tokens
.updated_on
= '2018-01-19 14:07:35' WHERE tokens
.user_id
= 1 AND tokens
.value
= 'b2df332938226b97433a3b8e3e040244383f875b' AND tokens
.action
= 'session' AND (created_on > '2018-01-19 10:07:35.213510') AND (updated_on > '2018-01-19 13:07:35.213696')
(0.2ms) SELECT MAX(settings
.updated_on
) FROM settings
User Load (0.2ms) SELECT users
. FROM users
WHERE users
.type
IN ('User', 'AnonymousUser') AND users
.status
= 1 AND users
.id
= 1 LIMIT 1
Current user: admin (id=1)
(0.2ms) SELECT MAX(contacts_settings
.updated_on
) FROM contacts_settings
Attachment Load (0.2ms) SELECT attachments
.* FROM attachments
WHERE attachments
.id
= 73 LIMIT 1
Completed 304 Not Modified in 8ms (ActiveRecord: 3.3ms)
this file is there in another table named dmsf_file_revisions and when i searching with file name xapian searching in this table and get the file but for content search it refers to attachments table and file is not listed there, is there any way to list all the missing dmsf files in attachments table? below is the query result.
select dmsf_file_revisions.disk_filename from dmsf_file_revisions where dmsf_file_revisions.disk_filename = '170725114635_5870_DAA_Portage.docx'; +------------------------------------+ | disk_filename | +------------------------------------+ | 170725114635_5870_DAA_Portage.docx | +------------------------------------+
You mixes searching in attachments and in DMSF documents. You must have two separated indexes, one for attachments and one for documents. Paths to the indexes must be set in Xapian and DMSF plugin individually.
but I have only set $files = 'files/dmsf' in the xapian_indexer.rb file to index only dmsf files. please guide me how to separate the search of attachments and documents?
The Xapian plugin serves full-text search in attachments (Files, Issues, Wiki). So you should set the path to files (files) in the configuration and in the indexer (_plugins/redmine_xapian/extra/xapianindexr.rb) too. The DMSF plugins has got its own full-text search engine independent on the Xapian plugin. Again you must set path to documents (dmsf) in the configuration and indexer (_plugins/redmine_dmsf/extra/xapianindexr.rb) too.
Now I delete all the index and recreate index using xapian_indexer.rb provided with DMSF, and completely disable the redmine_xapian plugin. still result is same if i search with file name then xapian searching in right table and if i search with key word it searching in attachments table but this time log is different and even not found the file name.
Started GET "/redmine/search?utf8=%E2%9C%93&q=Human+Machine&scope=all&all_words=&all_words=1&titles_only=&documents=1&dmsf_files=1&attachments=1&commit=Submit" for 164.177.48.9 at 2018-01-19 15:25:42 +0100
Processing by SearchController#index as HTML
Parameters: {"utf8"=>"✓", "q"=>"Human Machine", "scope"=>"all", "all_words"=>"1", "titles_only"=>"", "documents"=>"1", "dmsf_files"=>"1", "attachments"=>"1", "commit"=>"Submit"}
SQL (2.6ms) UPDATE tokens
SET tokens
.updated_on
= '2018-01-19 15:25:42' WHERE tokens
.user_id
= 1 AND tokens
.value
= '82acbccea25c5a6be9e8828af7dd3077d56f4a02' AND tokens
.action
= 'session' AND (created_on > '2018-01-19 11:25:42.702275') AND (updated_on > '2018-01-19 14:25:42.702463')
(0.2ms) SELECT MAX(settings
.updated_on
) FROM settings
User Load (0.2ms) SELECT users
. FROM users
WHERE users
.type
IN ('User', 'AnonymousUser') AND users
.status
= 1 AND users
.id
= 1 LIMIT 1
Current user: admin (id=1)
(0.1ms) SELECT MAX(contacts_settings
.updated_on
) FROM contacts_settings
UserPreference Load (0.2ms) SELECT user_preferences
. FROM user_preferences
WHERE user_preferences
.user_id
= 1 LIMIT 1
(0.1ms) BEGIN
SQL (0.2ms) UPDATE user_preferences
SET others
= '---\n:no_self_notified: \'1\'\n:comments_sorting: asc\n:warn_on_leaving_unsaved: \'1\'\n:gantt_zoom: 2\n:gantt_months: 6\n:diff_type: sbs\n:xapian_search_option:\n- all_words\n:xapian_search_scope:\n- documents\n- dmsf_files\n- attachments\n' WHERE user_preferences
.id
= 1
(3.2ms) COMMIT
(0.1ms) BEGIN
(0.1ms) COMMIT
(0.4ms) SELECT DISTINCT documents
.created_on
, documents
.id
FROM documents
INNER JOIN projects
ON projects
.id
= documents
.project_id
WHERE (projects.status <> 9 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='documents')) AND (((title LIKE '%Human%') OR (documents.description LIKE '%Human%')) AND ((title LIKE '%Machine%') OR (documents.description LIKE '%Machine%'))) ORDER BY documents
.created_on
DESC, documents
.id
DESC
CustomField Load (0.2ms) SELECT custom_fields
. FROM custom_fields
WHERE custom_fields
.type
= 'DocumentCustomField' AND custom_fields
.searchable
= 1
(0.4ms) SELECT DISTINCT documents
.created_on
, documents
.id
FROM documents
INNER JOIN projects
ON projects
.id
= documents
.project_id
INNER JOIN attachments
ON attachments
.container_id
= documents
.id
AND attachments
.container_type
= 'Document' WHERE (projects.status <> 9 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='documents')) AND (((attachments.filename LIKE '%Human%') OR (attachments.description LIKE '%Human%')) AND ((attachments.filename LIKE '%Machine%') OR (attachments.description LIKE '%Machine%'))) ORDER BY documents
.created_on
DESC, documents
.id
DESC
DmsfFile Load (24.9ms) SELECT DISTINCT dmsf_files
. FROM dmsf_files
INNER JOIN dmsf_file_revisions
ON dmsf_file_revisions
.dmsf_file_id
= dmsf_files
.id
JOIN projects ON dmsf_files.container_id = projects.id AND dmsf_files.container_type = 'Project' WHERE dmsf_files
.deleted
= 0 AND (projects.status <> 9 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='dmsf')) AND (((LOWER(dmsf_files.name) LIKE '%human%') OR (LOWER(dmsf_file_revisions.title) LIKE '%human%') OR (LOWER(dmsf_file_revisions.description) LIKE '%human%') OR (LOWER(dmsf_file_revisions.comment) LIKE '%human%')) AND ((LOWER(dmsf_files.name) LIKE '%machine%') OR (LOWER(dmsf_file_revisions.title) LIKE '%machine%') OR (LOWER(dmsf_file_revisions.description) LIKE '%machine%') OR (LOWER(dmsf_file_revisions.comment) LIKE '%machine%')))
Attachment::search
(0.7ms) SELECT DISTINCT attachments
.created_on
, attachments
.id
FROM attachments
JOIN issues ON attachments.container_id = issues.id JOIN projects ON issues.project_id = projects.id WHERE (attachments.container_type = 'Issue' AND projects.status = 1 AND projects.status <> 9 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='issue_tracking')) AND (((LOWER(attachments.filename) LIKE '%human%') OR (LOWER(attachments.description) LIKE '%human%')) AND ((LOWER(attachments.filename) LIKE '%machine%') OR (LOWER(attachments.description) LIKE '%machine%')))
(0.3ms) SELECT DISTINCT attachments
.created_on
, attachments
.id
FROM attachments
JOIN messages ON attachments.container_id = messages.id JOIN boards ON boards.id = messages.board_id JOIN projects ON boards.project_id = projects.id WHERE (attachments.container_type = 'Message' AND projects.status = 1) AND (((LOWER(attachments.filename) LIKE '%human%') OR (LOWER(attachments.description) LIKE '%human%')) AND ((LOWER(attachments.filename) LIKE '%machine%') OR (LOWER(attachments.description) LIKE '%machine%')))
(0.8ms) SELECT DISTINCT attachments
.created_on
, attachments
.id
FROM attachments
JOIN wiki_pages ON attachments.container_id = wiki_pages.id JOIN wikis ON wikis.id = wiki_pages.wiki_id JOIN projects ON wikis.project_id = projects.id WHERE (attachments.container_type = 'WikiPage' AND projects.status = 1 AND projects.status <> 9 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='wiki')) AND (((LOWER(attachments.filename) LIKE '%human%') OR (LOWER(attachments.description) LIKE '%human%')) AND ((LOWER(attachments.filename) LIKE '%machine%') OR (LOWER(attachments.description) LIKE '%machine%')))
(0.6ms) SELECT DISTINCT attachments
.created_on
, attachments
.id
FROM attachments
JOIN projects ON projects.id = container_id WHERE (container_type = 'Project' AND projects.status = 1 AND projects.status <> 9 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='files')) AND (((LOWER(attachments.filename) LIKE '%human%') OR (LOWER(attachments.description) LIKE '%human%')) AND ((LOWER(attachments.filename) LIKE '%machine%') OR (LOWER(attachments.description) LIKE '%machine%')))
Call xapian search service for Attachment
XapianSearch::search
XapianSearch::xapian_search
Call xapian search service for Attachment completed
Member Exists (0.2ms) SELECT 1 AS one FROM members
INNER JOIN projects
ON projects
.id
= members
.project_id
WHERE members
.user_id
= 1 AND (projects.status<>9) LIMIT 1
Rendered plugins/redmine_xapian/app/views/search/index.html.erb within layouts/base (3.6ms)
Rendered plugins/unread_issues/app/views/hooks/unread_isues/_add_css.html.erb (0.1ms)
Rendered plugins/clipboard_image_paste/app/views/clipboard_image_paste/_headers.html.erb (0.3ms)
Attachment Load (0.3ms) SELECT attachments
. FROM attachments
WHERE attachments
.container_id
= 1 AND attachments
.container_type
= 'Principal' AND (attachments.description = 'avatar') LIMIT 1
Project Load (0.5ms) SELECT projects
. FROM projects
WHERE (projects.status <> 9 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='time_tracking'))
Project Load (0.2ms) SELECT projects
.id
, projects
.name
, projects
.identifier
, projects
.lft
, projects
.rgt
FROM projects
INNER JOIN members
ON projects
.id
= members
.project_id
WHERE members
.user_id
= 1 AND (projects.status<>9) AND projects
.status
= 1
WkAttendance Load (0.2ms) select a. from wk_attendances a inner join ( select max(start_time) as start_time,user_id from wk_attendances where user_id = 1 group by user_id ) vw on a.start_time = vw.start_time and a.user_id = vw.user_id order by a.start_time
Rendered plugins/redmine_wktime/app/views/wktime/_attendance_widget.html.erb (0.5ms)
Rendered plugins/redmine_contacts/app/views/common/_contacts_select2_data.html.erb (0.2ms)
TimeLogger Load (0.2ms) SELECT time_loggers
. FROM time_loggers
WHERE time_loggers
.user_id
= 1 LIMIT 1
Project Load (0.2ms) SELECT projects
. FROM projects
(0.2ms) SELECT enabled_modules
.name
FROM enabled_modules
WHERE enabled_modules
.project_id
= 1
Rendered plugins/time_logger/app/views/time_loggers/_embed_menu.html.erb (2.6ms)
Rendered plugins/time_logger/app/views/time_loggers/_update_menu.html.erb (2.9ms)
Rendered plugins/clipboard_image_paste/app/views/clipboard_image_paste/_add_form.html.erb (2.0ms)
Rendered plugins/redmine_people/app/views/common/_people_select2_data.html.erb (0.2ms)
Rendered plugins/redmine_people/app/views/common/_layout_bottom.html.erb (0.3ms)
Completed 200 OK in 76ms (Views: 20.9ms | ActiveRecord: 37.2ms)
Started GET "/redmine/people/avatar?id=73&size=80x80" for 164.177.48.9 at 2018-01-19 15:25:43 +0100
Processing by PeopleController#avatar as /
Parameters: {"id"=>"73", "size"=>"80x80"}
SQL (2.5ms) UPDATE tokens
SET tokens
.updated_on
= '2018-01-19 15:25:43' WHERE tokens
.user_id
= 1 AND tokens
.value
= '82acbccea25c5a6be9e8828af7dd3077d56f4a02' AND tokens
.action
= 'session' AND (created_on > '2018-01-19 11:25:43.018615') AND (updated_on > '2018-01-19 14:25:43.018817')
(0.2ms) SELECT MAX(settings
.updated_on
) FROM settings
User Load (0.2ms) SELECT users
. FROM users
WHERE users
.type
IN ('User', 'AnonymousUser') AND users
.status
= 1 AND users
.id
= 1 LIMIT 1
Current user: admin (id=1)
(0.1ms) SELECT MAX(contacts_settings
.updated_on
) FROM contacts_settings
Attachment Load (0.2ms) SELECT attachments
.* FROM attachments
WHERE attachments
.id
= 73 LIMIT 1
Completed 304 Not Modified in 7ms (ActiveRecord: 3.2ms)
another thing i noticed the file comes with xapian plugin plugins/redmine_xapian/extra/xapian_indexr.rb is almost exactly same as one comes with dmsf plugins/redmine_dmsf/extra/xapian_indexr.rb so don't think it will make much difference.
It doesn't seem that you have disabled Xapian plugin completely:
Rendered plugins/redmine_xapian/app/views/search/index.html.erb within layouts/base (3.6ms)
Yes I have tried all the option, if I completely stop the xapian plugin then normal file search using file name also not happening. that's why i re-enable the plugin again.
This is my last comment to this topic: Searching in documents and files are two totally independent processes. So:
1) Xapian indexes must be in two independent folders.
2) Documents and files must be two independent folders. Not files
and files/dmsf
otherwise you index dmsf sub-folder during files indexing.
3) Use xapian_indexer from xapian plugin for files and xapian_indexer from dmsf plugin for documents. Set correct paths in both indexers.
4) Set individual path in both plugins.
5) Check the output of all tools and think a little about it! You will find for sure what went wrong.
Hi,
I am using Redmine 3.3.1 with Xapian 1.6.7 and DMSF 1.5.9. I did all the steps still content search is not working.