danmunn / redmine_dmsf

Fork of svn repository for redmine_dmsf
GNU General Public License v2.0
421 stars 195 forks source link

Full text search doesn't always work with some queries #569

Closed shemgp closed 8 years ago

shemgp commented 8 years ago

Hello,

If I search for 'request' in Redmine, I get results. But if I search for a different term that's in the files also (eg. Philippines, or BUSINESS) it doesn't show up.

Here's the production log:

Starting Pretend plugin for RedMine
Started GET "/redmine/projects/optimize-forms/search?utf8=%E2%9C%93&q=Philippines&scope=&all_words=&all_words=1&titles_only=&issues=1&wiki_pages=1&contacts=1&dmsf_files=1&dmsf_folders=1&attachments=0&options=0&commit=Submit" for 172.17.0.198 at 2016-08-30 10:40:48 +0800
Processing by SearchController#index as HTML
  Parameters: {"utf8"=>"✓", "q"=>"Philippines", "scope"=>"", "all_words"=>"1", "titles_only"=>"", "issues"=>"1", "wiki_pages"=>"1", "contacts"=>"1", "dmsf_files"=>"1", "dmsf_folders"=>"1", "attachments"=>"0", "options"=>"0", "commit"=>"Submit", "id"=>"optimize-forms"}
  Current user: shemgp (id=7)
  Rendered search/index.html.erb within layouts/base (9.9ms)
  Rendered plugins/redmine_code_review/app/views/code_review/_html_header.html.erb (2.7ms)
  Rendered plugins/redmine_create_wiki_page/app/views/create_wiki_page/_init_create_wiki_page.erb (0.1ms)
  Rendered inline template (1.3ms)
redmine_highlightjs2: supported browser: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:48.0) Gecko/20100101 Firefox/48.0
  Rendered plugins/redmine_pretend/app/views/user/_unpretend.html.erb (0.1ms)
  Rendered plugins/redmine_code_review/app/views/code_review/_body_bottom.html.erb (0.6ms)
Completed 200 OK in 149ms (Views: 74.1ms | ActiveRecord: 30.1ms)
Started GET "/redmine/projects/optimize-forms/search?utf8=%E2%9C%93&q=Request&scope=&all_words=&all_words=1&titles_only=&issues=1&wiki_pages=1&contacts=1&dmsf_files=1&dmsf_folders=1&attachments=0&options=0&commit=Submit" for 172.17.0.198 at 2016-08-30 10:41:20 +0800
Processing by SearchController#index as HTML
  Parameters: {"utf8"=>"✓", "q"=>"Request", "scope"=>"", "all_words"=>"1", "titles_only"=>"", "issues"=>"1", "wiki_pages"=>"1", "contacts"=>"1", "dmsf_files"=>"1", "dmsf_folders"=>"1", "attachments"=>"0", "options"=>"0", "commit"=>"Submit", "id"=>"optimize-forms"}
  Current user: shemgp (id=7)
  Rendered search/index.html.erb within layouts/base (58.7ms)
  Rendered plugins/redmine_code_review/app/views/code_review/_html_header.html.erb (2.9ms)
  Rendered plugins/redmine_create_wiki_page/app/views/create_wiki_page/_init_create_wiki_page.erb (0.1ms)
  Rendered inline template (1.3ms)
redmine_highlightjs2: supported browser: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:48.0) Gecko/20100101 Firefox/48.0
  Rendered plugins/redmine_pretend/app/views/user/_unpretend.html.erb (0.2ms)
  Rendered plugins/redmine_code_review/app/views/code_review/_body_bottom.html.erb (0.7ms)
Completed 200 OK in 238ms (Views: 119.3ms | ActiveRecord: 38.5ms)
Starting Pretend plugin for RedMine
Started GET "/redmine/projects/optimize-forms/search?utf8=%E2%9C%93&q=BUSINESS&scope=&all_words=&all_words=1&titles_only=&issues=1&wiki_pages=1&contacts=1&dmsf_files=1&dmsf_folders=1&attachments=0&options=0&commit=Submit" for 172.17.0.198 at 2016-08-30 10:46:43 +0800
Processing by SearchController#index as HTML
  Parameters: {"utf8"=>"✓", "q"=>"BUSINESS", "scope"=>"", "all_words"=>"1", "titles_only"=>"", "issues"=>"1", "wiki_pages"=>"1", "contacts"=>"1", "dmsf_files"=>"1", "dmsf_folders"=>"1", "attachments"=>"0", "options"=>"0", "commit"=>"Submit", "id"=>"optimize-forms"}
  Current user: shemgp (id=7)
  Rendered search/index.html.erb within layouts/base (10.2ms)
  Rendered plugins/redmine_code_review/app/views/code_review/_html_header.html.erb (2.9ms)
  Rendered plugins/redmine_create_wiki_page/app/views/create_wiki_page/_init_create_wiki_page.erb (0.1ms)
  Rendered inline template (1.3ms)
redmine_highlightjs2: supported browser: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:48.0) Gecko/20100101 Firefox/48.0
  Rendered plugins/redmine_pretend/app/views/user/_unpretend.html.erb (0.2ms)
  Rendered plugins/redmine_code_review/app/views/code_review/_body_bottom.html.erb (0.7ms)
Completed 200 OK in 151ms (Views: 75.1ms | ActiveRecord: 29.1ms)

Here's the xapian logs:

root@golan /var/tmp/dmsf-index/english # quest -d . 'BUSINESS'
Parsed Query: Xapian::Query(business:(pos=1))
MSet:
7 [100%]
url=/p_optimize-forms/160727163906_9_ARO-03.pdf
sample=MATERIAL REQUEST FORM ADVANCfM(NT A RECRUIT»^NT OfFICE | AltAS Requested By:. (Priced fWTM? ©I Iho D«?<«)n rcQuevt^rtg Department:— E-mail: Telephone: Date Needed:— Target Audience:. Purpose/Event:. □ AIIAS Brochure Qr>. □ Flags Magazine □ Business Biochure nry □ Business Card rrry □ Education Brochure nty □ ADpllcation Form nry □ English Brochure Oiy □ Financial Information ay. □ Public Health Brochure City □ PowerPoint/Video n-Y □ Online Brochure nry □ Academic Bulletin ...
type=application/pdf
modtime=1469608746
size=71086
6 [57%]
url=/p_optimize-forms/160727163907_14_RE-02.pdf
sample=o AllXi CONTRACT FOR INDIVIDUAL STUDY An individual study may be part of a student's program and is a contract of agreement between the student and the supervising professor. It may require program/department, and in some cases, ASAC approval as well. Unless specifically stated, the work is to be completed within the semester. The student Is to complete the form, obtain the required signatures and make two additional copies. I. Student and Course information Student Program Registration: □ 1" Semester ...
type=application/pdf
modtime=1469608747
size=233916
root@golan /var/tmp/dmsf-index/english # quest -d . 'Philippines'
Parsed Query: Xapian::Query(philippines:(pos=1))
MSet:
2 [100%]
url=/p_optimize-forms/160727163908_20_RE-10.pdf
sample=o AIIAS ADVENTIST INTERNATIONAL INSTITUTE OF ADVANCED STUDIES v'f^ P.O. Box 038. Silang 4118. Cavile, Philippines 9(63](46)414-4316, 414-4318; ™-Fax;[63](46)414-4301 ftE-Mail; rBaislrar@aiias edu UWebsite: www.3iias.edu Change of Grade Form Date TO THE REGISTRAR: look the course Student Course No./Title under me in and SemesterA'ear was given a grade of _ _. Please allow me to change his/lier grade to REASON FOR THE CHANGE: Professor Date APPROVED: Academic Dean Date 
type=application/pdf
modtime=1469608748
size=89593
10 [100%]
url=/p_optimize-forms/160727163909_21_RE-11.pdf
sample=ADVENTIST INTERNATIONAL INSTITUTE OF ADVANCED STUDIES P.O. Box 038, Silang4ll8, Cavite, Philippines S[63](46)414-4304,414-4309; - Fax: [63](46)414-4310,414-4309 i E-Mail: reQistfaf.aaiias eflu BWeDsite ww^vanaseau REQUEST FOR CROSS-ENROLLMENT LETTER INSTRUCTION TO STUDENT 1. 2. Fill up and Secure Program Director's signature Submit 10 the Registrar's Onice.AllAS The Registrar AIIAS Lalaan 1, Silang, Cavite (degree) student of AIIaS, wish to request for a cross-enrollment permit to take the following ...
type=application/pdf
modtime=1469608749
size=96155
14 [100%]
url=/p_optimize-forms/160727163906_5_AR-05.pdf
sample=OADVENTIST INTERNATIONAL INSTITUTE OF ADVANCED STUDIES P.O. Box 038, Silang 4118, Cavile, Philippines 9(83)(46) 414-4316, 414-4318; »«Fax:[63](46)414-4300 ^ .m.r. .■•in tE-Mail: r. 'ji-.lr ii"tMii.i . ..••Ill HWebSile Change of Modality (Deals with changes to/from On Campu.s, Dislance Learning Center, Division of Online Learning) I would like to request a change in my degree program from; Existing Modality Modality I would like to change to. Name and Signature of Student Date Note: If sponsored ...
type=application/pdf
modtime=1469608746
size=101184
19 [100%]
url=/p_optimize-forms/160727163910_22_RE-12.pdf
sample=o AIIAS ADVENTIST INTERNATIONAL INSTITUTE OF ADVANCED STUDIES ^'-1 P.O. Box 038, Silang 4118, Cavite. Philippines a [63](46)414-4316, 414-4315; i.-Fax:[63](46)414-4301 &E-Mail: reoislrar@aiias.edu .QWebsite: www.aiias.edu UPDATING OF COURSE FORM Name Date Program Course & Prefix No. Course Title Method of updating: Professor Program Director Department Action; Chief Accountant ASAC Action: Registrar Note: Once completed, kindly return to the Records' office. 
type=application/pdf
modtime=1469608750
size=109388
1 [95%]
url=/p_optimize-forms/160727163906_3_AR-02.pdf
sample=ADVENTIST INTERNATIONAL INSTITUTE OF ADVANCED STUDIES «iC! P.O. Box 038, Silang 4118, Cavite, Philippines 8[63](46) 414-4316, 414-4318; -Fax:[63](46)414-4301 o &E-Mail: reaislrartSiaiias.eclu HWebsite: www.allas.edu Change or Addition of Program I would like to request: □ Addition of program □ Change from one program to another Existing Program and Emphasis New Program Emphasis Name and signature of student Date Note: If sponsored, a letter of approval fi-om your sponsoring organization must be ...
type=application/pdf
modtime=1469608746
size=131467
22 [94%]
url=/p_optimize-forms/160727163906_4_AR-03.pdf
sample=OADVENTIST INTERNATIONAL INSTITUTE OF ADVANCED STUDIES P.O. Box 038, Silang4n8, Cavile, Philippines 8(63)(46)414-4316, 414-4318; ^Fax:|63|(46) 414-4300 .JS ^ iSiE-Mail: (I If III •■i ll ! QWobsile Addition or Change of Emphasis I would like to request a change in my program emphasis. □ Addition of program emphasis Existing program emphasis New program emphasis I would like to add □ Change of program emphasis The program emphasis I would like to change to Name and signature of Student Chair/Program ...
type=application/pdf
modtime=1469608746
size=146135
21 [90%]
url=/p_optimize-forms/160727163904_1_AD-01.pdf
sample=ADVENTIST INTERNATIONAL INSTITUTE OF ADVANCED STUDIES PHOTO P.O. Box 038, SilonB 18, Caviie, Philippines S(63|(46)414-4318; '-;Fax:(63)(46)414-4301/318 w.E-Mail: adtni.'isioiisftl'aiiLis edii QWcbsilc. mvw aiiaiedii AIIAS APPLICATION FOR ADMISSION PERSQNAVINFORMATION -• Family Name • ftssteiwfSwls-'-r; '-r - - % First Name Ivliddle Name Ii^arital Status O Single O Married Passport No. Current Aditress Place of Birth Age Date of Birth Gender Citizenship mm/dd/yyyy O l^ale O Female E-mail Address ...
type=application/pdf
modtime=1469608744
size=505896
15 [89%]
url=/p_optimize-forms/160727163907_11_GR-01.pdf
sample=o AIIAS APPLICATION FOR GRADUATION THIS APPLICATION IS ONLY VALID FOR THE DATE OF CONFERRAL REQUESTED PLEASE PRINT Student's Complete Name Print your name sS3£tl^ as it appears on your legal document(passport/birth certificate/marriage contract). This name will be on your transcript, diploma and commencement program. Degree to be conferred Emphasis/Major/Concentration_ DATE OF CONFERRAL n I plan to attend the graduation ceremony n I wll not be able to attend the ceremony, thus I will graduate in absentia ...
type=application/pdf
modtime=1469608747
size=190999
16 [88%]
url=/p_optimize-forms/160727163907_12_GR-02.pdf
sample=ADVENTIST INTERNATIONAL INSTITUTE OF ADVANCED STUDIES P.O. Box 038, Silang, Cavite 41 18, Philippines CONTRACT FOR RENTAL/PURCHASE OF ACADEMIC REGALIA | request to rent/purchase from AIIAS the following item(s): (please print name in full) (Please check): Complete Set ofRegalia (Gown, hood, and cap) Gown and cap Hood My degree program is:. RENTAL Cap = cm.(around head) I assume full responsibility for returning the above item(s) in good condition within ONE DAY (24 hours) ofthe end ofthe graduation ...
type=application/pdf
modtime=1469608747
size=157133
9 [84%]
url=/p_optimize-forms/160727163908_19_RE-08.pdf
sample=OADVENTIST INTERNATIONAL INSTITUTE OF ADVANCED STUDIES vit' P.O. Box 038, Silang 4118, Cavile, Philippines 8[631 (46)414-4316, 414-4318: eFax:(63](46)414-4301 ^ i4iE-Mail: ic'i|i;-tt,ir(d\iii.ir, Pilu HWebsite vavv/mi,)!, eilu AGREEMENT FOR INCOMPLETE GRADE STUDENT PROFESSOR. PROGRAM COURSE _ TERM DATE Student's reason for not completing assigned work Additional work to be completed before Incomplete can be removed: Date by which all requirements must be turned in to the professor if work is NOT completed ...
type=application/pdf
modtime=1469608748
size=175188
root@golan /var/tmp/dmsf-index/english # quest -d . 'Request'
Parsed Query: Xapian::Query(request:(pos=1))
MSet:
13 [100%]
url=/p_optimize-forms/160727163906_10_FORMS_LOOKUP.pdf
sample=List of Admissions and Records office forms Updated 2015/01/14 Admissions and Records Office Forms Udm/ssions Office AD-01 iApplicalion for Admission AD-02 jDeclarotion of Finances AD-03 iGroducfe Evaluation AD-04 iSponsorship Form (VPF) AD-05 ImDIv Recommendotion* AD-06 jDM'.n Personoi Evaluation" AD-07 IDMin Personal Statement" AD-08 IPhD 8 Personal Statement* li-'hD Ed Personal Statement* AD-09 AD-11 IPhD R Personal Stotement* IPhD R Personal Evaluation AD-12 IHousing Form (SSO) AD-10 AD-13 I Request ...
type=application/pdf
modtime=1469608746
size=496868
10 [85%]
url=/p_optimize-forms/160727163909_21_RE-11.pdf
sample=ADVENTIST INTERNATIONAL INSTITUTE OF ADVANCED STUDIES P.O. Box 038, Silang4ll8, Cavite, Philippines S[63](46)414-4304,414-4309; - Fax: [63](46)414-4310,414-4309 i E-Mail: reQistfaf.aaiias eflu BWeDsite ww^vanaseau REQUEST FOR CROSS-ENROLLMENT LETTER INSTRUCTION TO STUDENT 1. 2. Fill up and Secure Program Director's signature Submit 10 the Registrar's Onice.AllAS The Registrar AIIAS Lalaan 1, Silang, Cavite (degree) student of AIIaS, wish to request for a cross-enrollment permit to take the following ...
type=application/pdf
modtime=1469608749
size=96155
7 [82%]
url=/p_optimize-forms/160727163906_9_ARO-03.pdf
sample=MATERIAL REQUEST FORM ADVANCfM(NT A RECRUIT»^NT OfFICE | AltAS Requested By:. (Priced fWTM? ©I Iho D«?<«)n rcQuevt^rtg Department:— E-mail: Telephone: Date Needed:— Target Audience:. Purpose/Event:. □ AIIAS Brochure Qr>. □ Flags Magazine □ Business Biochure nry □ Business Card rrry □ Education Brochure nty □ ADpllcation Form nry □ English Brochure Oiy □ Financial Information ay. □ Public Health Brochure City □ PowerPoint/Video n-Y □ Online Brochure nry □ Academic Bulletin ...
type=application/pdf
modtime=1469608746
size=71086
5 [76%]
url=/p_optimize-forms/160727163908_16_RE-05.pdf
sample=Form RE-05 Address; Km 45.5 AKuin<ild(i Hwy., Loliwn 1, SilatiH 411)1 C.wili', Philippines CLEARANCE FORM AIIAS Plionc; +65 (461 414-4:n(i/4I4-4J18 Adventist International Institute of Advanced Studies Fax; +63(461 414-450I/4I4-4310 Email; res^islrar®aiids.<;dj Admi'ss/on and Records Office Wciisilc www.aii.i-..e(lu Records Office Copy Sludent requesting clearance las! Name Middle Name First Name Day Month □ I am clearing because 1 plan to leave A11AS by Year □ I am clearing even though I plan to stay ...
type=application/pdf
modtime=1469608748
size=222528
14 [67%]
url=/p_optimize-forms/160727163906_5_AR-05.pdf
sample=OADVENTIST INTERNATIONAL INSTITUTE OF ADVANCED STUDIES P.O. Box 038, Silang 4118, Cavile, Philippines 9(83)(46) 414-4316, 414-4318; »«Fax:[63](46)414-4300 ^ .m.r. .■•in tE-Mail: r. 'ji-.lr ii"tMii.i . ..••Ill HWebSile Change of Modality (Deals with changes to/from On Campu.s, Dislance Learning Center, Division of Online Learning) I would like to request a change in my degree program from; Existing Modality Modality I would like to change to. Name and Signature of Student Date Note: If sponsored ...
type=application/pdf
modtime=1469608746
size=101184
1 [64%]
url=/p_optimize-forms/160727163906_3_AR-02.pdf
sample=ADVENTIST INTERNATIONAL INSTITUTE OF ADVANCED STUDIES «iC! P.O. Box 038, Silang 4118, Cavite, Philippines 8[63](46) 414-4316, 414-4318; -Fax:[63](46)414-4301 o &E-Mail: reaislrartSiaiias.eclu HWebsite: www.allas.edu Change or Addition of Program I would like to request: □ Addition of program □ Change from one program to another Existing Program and Emphasis New Program Emphasis Name and signature of student Date Note: If sponsored, a letter of approval fi-om your sponsoring organization must be ...
type=application/pdf
modtime=1469608746
size=131467
22 [63%]
url=/p_optimize-forms/160727163906_4_AR-03.pdf
sample=OADVENTIST INTERNATIONAL INSTITUTE OF ADVANCED STUDIES P.O. Box 038, Silang4n8, Cavile, Philippines 8(63)(46)414-4316, 414-4318; ^Fax:|63|(46) 414-4300 .JS ^ iSiE-Mail: (I If III •■i ll ! QWobsile Addition or Change of Emphasis I would like to request a change in my program emphasis. □ Addition of program emphasis Existing program emphasis New program emphasis I would like to add □ Change of program emphasis The program emphasis I would like to change to Name and signature of Student Chair/Program ...
type=application/pdf
modtime=1469608746
size=146135
4 [60%]
url=/p_optimize-forms/160727163906_7_ARO-01.pdf
sample=ADVANCEMENT & RECRUITMENT OFFICE JOB REQUEST FORM lEt:#-::.-. V CLIENT INFORMATION •■-A WneiUHOMV. Date received: Requested By;. (Pfinred nifM Approved By: _ It* WWi'Wuesting (Pflnted ridmc snd si^naiure o'woik suD«fvisor of di^cof) Estimated completion date:. Actual completion date: Estimated design hours: Actual design hours: Department:. E-mail: Telephone: Job Name: Date Needed: Purpose/Event; Target Audience:. File checklist: □ Text (edited) □ Provided □ Photos/graphics (hl-res) □ Supply ...
type=application/pdf
modtime=1469608746
size=316190
16 [59%]
url=/p_optimize-forms/160727163907_12_GR-02.pdf
sample=ADVENTIST INTERNATIONAL INSTITUTE OF ADVANCED STUDIES P.O. Box 038, Silang, Cavite 41 18, Philippines CONTRACT FOR RENTAL/PURCHASE OF ACADEMIC REGALIA | request to rent/purchase from AIIAS the following item(s): (please print name in full) (Please check): Complete Set ofRegalia (Gown, hood, and cap) Gown and cap Hood My degree program is:. RENTAL Cap = cm.(around head) I assume full responsibility for returning the above item(s) in good condition within ONE DAY (24 hours) ofthe end ofthe graduation ...
type=application/pdf
modtime=1469608747
size=157133
root@golan /var/tmp/dmsf-index/english # 
picman commented 8 years ago

Can you attach a document where you are unable to search the mentioned word Philippines and Business.

shemgp commented 8 years ago

Here they are: RE-10.pdf ARO-03.pdf

picman commented 8 years ago

It seems to be working as expected. In my case at least.

  1. Check the path to the Xapian database in the plugin settings.
  2. Check the options set in extra/xapian_indexer.rb
  3. Increase the Redmine's log level to debug

0 0 0 0_2016-08-31_08-23-45

shemgp commented 8 years ago

Still doesn't work with my server. Xapian database plugin settings: screenshot from 2016-08-31 14-37-48 extra/xapian_indexer.rb: screenshot from 2016-08-31 14-49-07 Logs:

Started GET "/redmine/projects/optimize-forms/search?utf8=%E2%9C%93&q=Request&scope=&all_words=&all_words=1&titles_only=&issues=1&wiki_pages=1&contacts=1&dmsf_files=1&dmsf_folders=1&attachments=0&options=0&commit=Submit" for 172.17.0.198 at 2016-08-31 14:42:03 +0800
Processing by SearchController#index as HTML
  Parameters: {"utf8"=>"✓", "q"=>"Request", "scope"=>"", "all_words"=>"1", "titles_only"=>"", "issues"=>"1", "wiki_pages"=>"1", "contacts"=>"1", "dmsf_files"=>"1", "dmsf_folders"=>"1", "attachments"=>"0", "options"=>"0", "commit"=>"Submit", "id"=>"optimize-forms"}
  SQL (1693.6ms)  UPDATE "tokens" SET "updated_on" = '2016-08-31 14:42:03.987013' WHERE "tokens"."user_id" = $1 AND "tokens"."value" = $2 AND "tokens"."action" = $3  [["user_id", 7], ["value", "39ffd10e6af0ec67c3baba5b3a464f8a41f31e4c"], ["action", "session"]]
   (1.3ms)  SELECT MAX("settings"."updated_on") FROM "settings"
  User Load (0.7ms)  SELECT  "users".* FROM "users" WHERE "users"."type" IN ('User', 'AnonymousUser') AND "users"."status" = $1 AND "users"."id" = $2 LIMIT 1  [["status", 1], ["id", 7]]
  Current user: shemgp (id=7)
   (0.7ms)  SELECT MAX("contacts_settings"."updated_on") FROM "contacts_settings"
  Project Load (0.7ms)  SELECT  "projects".* FROM "projects" WHERE "projects"."identifier" = $1 LIMIT 1  [["identifier", "optimize-forms"]]
   (0.6ms)  SELECT "enabled_modules"."name" FROM "enabled_modules" WHERE "enabled_modules"."project_id" = $1  [["project_id", 5]]
   (1.6ms)  SELECT DISTINCT "issues"."created_on", "issues"."id" FROM "issues" INNER JOIN "projects" ON "projects"."id" = "issues"."project_id" WHERE (projects.status <> 9 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='issue_tracking')) AND (issues.project_id IN (5)) AND (((subject ILIKE '%Request%') OR (issues.description ILIKE '%Request%')))  ORDER BY "issues"."created_on" DESC, "issues"."id" DESC
  CustomField Load (0.5ms)  SELECT "custom_fields".* FROM "custom_fields" WHERE "custom_fields"."type" = $1 AND "custom_fields"."searchable" = $2  [["type", "IssueCustomField"], ["searchable", "t"]]
   (1.9ms)  SELECT DISTINCT "issues"."created_on", "issues"."id" FROM "issues" INNER JOIN "projects" ON "projects"."id" = "issues"."project_id" INNER JOIN "journals" ON "journals"."journalized_id" = "issues"."id" AND "journals"."journalized_type" = $1 WHERE (projects.status <> 9 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='issue_tracking')) AND (issues.project_id IN (5)) AND (journals.private_notes = 'f' OR (projects.status <> 9 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='issue_tracking'))) AND (((journals.notes ILIKE '%Request%')))  ORDER BY "issues"."created_on" DESC, "issues"."id" DESC  [["journalized_type", "Issue"]]
   (2.1ms)  SELECT DISTINCT "wiki_pages"."created_on", "wiki_pages"."id" FROM "wiki_pages" INNER JOIN "wiki_contents" ON "wiki_contents"."page_id" = "wiki_pages"."id" INNER JOIN "wikis" ON "wikis"."id" = "wiki_pages"."wiki_id" INNER JOIN "projects" ON "projects"."id" = "wikis"."project_id" WHERE (projects.status <> 9 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='wiki')) AND (wikis.project_id IN (5)) AND (((title ILIKE '%Request%') OR (wiki_contents.text ILIKE '%Request%')))  ORDER BY "wiki_pages"."created_on" DESC, "wiki_pages"."id" DESC
  User Load (0.9ms)  SELECT  "users".* FROM "users" WHERE "users"."type" IN ('User', 'AnonymousUser') AND "users"."id" = $1 LIMIT 1  [["id", 7]]
  Group Load (3.5ms)  SELECT "users".* FROM "users" INNER JOIN "groups_users" ON "users"."id" = "groups_users"."group_id" WHERE "users"."type" IN ('Group', 'GroupBuiltin', 'GroupAnonymous', 'GroupNonMember') AND "groups_users"."user_id" = $1  [["user_id", 7]]
   (1.3ms)  SELECT "projects"."id" FROM "projects" WHERE (projects.status = 1 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='contacts'))
  CACHE (0.0ms)  SELECT "projects"."id" FROM "projects" WHERE (projects.status = 1 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='contacts'))
   (2.4ms)  SELECT DISTINCT "contacts"."created_on", "contacts"."id" FROM "contacts" LEFT OUTER JOIN "contacts_projects" ON "contacts_projects"."contact_id" = "contacts"."id" LEFT OUTER JOIN "projects" ON "projects"."id" = "contacts_projects"."project_id" LEFT OUTER JOIN "addresses" ON "addresses"."addressable_id" = "contacts"."id" AND "addresses"."address_type" = $1 AND "addresses"."addressable_type" = $2 LEFT OUTER JOIN "notes" ON "notes"."source_id" = "contacts"."id" AND "notes"."source_type" = $3 WHERE ((projects.id <> -1 ) AND ((contacts.visibility = 1) OR (projects.id IN (1,5)) )) AND (projects.id IN (5)) AND (((contacts.first_name ILIKE '%Request%') OR (contacts.middle_name ILIKE '%Request%') OR (contacts.last_name ILIKE '%Request%') OR (contacts.company ILIKE '%Request%') OR (contacts.email ILIKE '%Request%') OR (addresses.full_address ILIKE '%Request%') OR (contacts.background ILIKE '%Request%') OR (notes.content ILIKE '%Request%')))  ORDER BY "contacts"."created_on" DESC, "contacts"."id" DESC  [["address_type", "business"], ["addressable_type", "Contact"], ["source_type", "Contact"]]
  DmsfFile Load (2.2ms)  SELECT DISTINCT "dmsf_files".* FROM "dmsf_files" INNER JOIN "projects" ON "projects"."id" = "dmsf_files"."project_id" INNER JOIN "dmsf_file_revisions" ON "dmsf_file_revisions"."dmsf_file_id" = "dmsf_files"."id" WHERE "dmsf_files"."deleted" = $1 AND (projects.status <> 9 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='dmsf') AND dmsf_files.project_id IN (5)) AND (((LOWER(dmsf_files.name) LIKE '%request%') OR (LOWER(dmsf_file_revisions.title) LIKE '%request%') OR (LOWER(dmsf_file_revisions.description) LIKE '%request%') OR (LOWER(dmsf_file_revisions.comment) LIKE '%request%')))  [["deleted", "f"]]
  DmsfFile Load (0.5ms)  SELECT  "dmsf_files".* FROM "dmsf_files" WHERE "dmsf_files"."deleted" = $1 AND "dmsf_files"."id" = $2  ORDER BY "dmsf_files"."id" ASC LIMIT 1  [["deleted", "f"], ["id", 10]]
  Project Load (0.7ms)  SELECT  "projects".* FROM "projects" WHERE "projects"."id" = $1 LIMIT 1  [["id", 5]]
   (0.5ms)  SELECT "enabled_modules"."name" FROM "enabled_modules" WHERE "enabled_modules"."project_id" = $1  [["project_id", 5]]
  DmsfFile Load (0.5ms)  SELECT  "dmsf_files".* FROM "dmsf_files" WHERE "dmsf_files"."deleted" = $1 AND "dmsf_files"."id" = $2  ORDER BY "dmsf_files"."id" ASC LIMIT 1  [["deleted", "f"], ["id", 16]]
  CACHE (0.0ms)  SELECT  "projects".* FROM "projects" WHERE "projects"."id" = $1 LIMIT 1  [["id", 5]]
  CACHE (0.1ms)  SELECT "enabled_modules"."name" FROM "enabled_modules" WHERE "enabled_modules"."project_id" = $1  [["project_id", 5]]
  DmsfFile Load (0.6ms)  SELECT  "dmsf_files".* FROM "dmsf_files" WHERE "dmsf_files"."deleted" = $1 AND "dmsf_files"."id" = $2  ORDER BY "dmsf_files"."id" ASC LIMIT 1  [["deleted", "f"], ["id", 5]]
  CACHE (0.0ms)  SELECT  "projects".* FROM "projects" WHERE "projects"."id" = $1 LIMIT 1  [["id", 5]]
  CACHE (0.0ms)  SELECT "enabled_modules"."name" FROM "enabled_modules" WHERE "enabled_modules"."project_id" = $1  [["project_id", 5]]
  DmsfFile Load (0.5ms)  SELECT  "dmsf_files".* FROM "dmsf_files" WHERE "dmsf_files"."deleted" = $1 AND "dmsf_files"."id" = $2  ORDER BY "dmsf_files"."id" ASC LIMIT 1  [["deleted", "f"], ["id", 3]]
  CACHE (0.0ms)  SELECT  "projects".* FROM "projects" WHERE "projects"."id" = $1 LIMIT 1  [["id", 5]]
  CACHE (0.0ms)  SELECT "enabled_modules"."name" FROM "enabled_modules" WHERE "enabled_modules"."project_id" = $1  [["project_id", 5]]
  DmsfFile Load (0.5ms)  SELECT  "dmsf_files".* FROM "dmsf_files" WHERE "dmsf_files"."deleted" = $1 AND "dmsf_files"."id" = $2  ORDER BY "dmsf_files"."id" ASC LIMIT 1  [["deleted", "f"], ["id", 4]]
  CACHE (0.0ms)  SELECT  "projects".* FROM "projects" WHERE "projects"."id" = $1 LIMIT 1  [["id", 5]]
  CACHE (0.1ms)  SELECT "enabled_modules"."name" FROM "enabled_modules" WHERE "enabled_modules"."project_id" = $1  [["project_id", 5]]
  DmsfFile Load (0.6ms)  SELECT  "dmsf_files".* FROM "dmsf_files" WHERE "dmsf_files"."deleted" = $1 AND "dmsf_files"."id" = $2  ORDER BY "dmsf_files"."id" ASC LIMIT 1  [["deleted", "f"], ["id", 12]]
  CACHE (0.0ms)  SELECT  "projects".* FROM "projects" WHERE "projects"."id" = $1 LIMIT 1  [["id", 5]]
  CACHE (0.0ms)  SELECT "enabled_modules"."name" FROM "enabled_modules" WHERE "enabled_modules"."project_id" = $1  [["project_id", 5]]
   (1.8ms)  SELECT DISTINCT "dmsf_folders"."updated_at", "dmsf_folders"."id" FROM "dmsf_folders" INNER JOIN "projects" ON "projects"."id" = "dmsf_folders"."project_id" WHERE (projects.status <> 9 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='dmsf')) AND (project_id IN (5)) AND (((dmsf_folders.title ILIKE '%Request%') OR (dmsf_folders.description ILIKE '%Request%')))  ORDER BY "dmsf_folders"."updated_at" DESC, "dmsf_folders"."id" DESC
  CustomField Load (0.5ms)  SELECT "custom_fields".* FROM "custom_fields" WHERE "custom_fields"."type" = $1 AND "custom_fields"."searchable" = $2  [["type", "DmsfFolderCustomField"], ["searchable", "t"]]
  DmsfFile Load (1.0ms)  SELECT "dmsf_files".* FROM "dmsf_files" WHERE "dmsf_files"."id" IN (21, 16, 12, 10, 9, 7, 6, 5, 4, 3)
  Member Exists (1.0ms)  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  [["user_id", 7]]
  CACHE (0.0ms)  SELECT  "projects".* FROM "projects" WHERE "projects"."id" = $1 LIMIT 1  [["id", 5]]
  DmsfFileRevision Load (1.0ms)  SELECT  "dmsf_file_revisions".* FROM "dmsf_file_revisions" WHERE "dmsf_file_revisions"."dmsf_file_id" = $1 AND "dmsf_file_revisions"."deleted" = $2  ORDER BY dmsf_file_revisions.major_version DESC, dmsf_file_revisions.minor_version DESC, dmsf_file_revisions.updated_at DESC LIMIT 1  [["dmsf_file_id", 21], ["deleted", "f"]]
  UserPreference Load (0.5ms)  SELECT  "user_preferences".* FROM "user_preferences" WHERE "user_preferences"."user_id" = $1 LIMIT 1  [["user_id", 7]]
  CACHE (0.0ms)  SELECT  "projects".* FROM "projects" WHERE "projects"."id" = $1 LIMIT 1  [["id", 5]]
  CACHE (0.0ms)  SELECT  "projects".* FROM "projects" WHERE "projects"."id" = $1 LIMIT 1  [["id", 5]]
  CACHE (0.0ms)  SELECT  "projects".* FROM "projects" WHERE "projects"."id" = $1 LIMIT 1  [["id", 5]]
  CACHE (0.0ms)  SELECT  "projects".* FROM "projects" WHERE "projects"."id" = $1 LIMIT 1  [["id", 5]]
  DmsfFileRevision Load (1.0ms)  SELECT  "dmsf_file_revisions".* FROM "dmsf_file_revisions" WHERE "dmsf_file_revisions"."dmsf_file_id" = $1 AND "dmsf_file_revisions"."deleted" = $2  ORDER BY dmsf_file_revisions.major_version DESC, dmsf_file_revisions.minor_version DESC, dmsf_file_revisions.updated_at DESC LIMIT 1  [["dmsf_file_id", 9], ["deleted", "f"]]
  CACHE (0.0ms)  SELECT  "projects".* FROM "projects" WHERE "projects"."id" = $1 LIMIT 1  [["id", 5]]
  DmsfFileRevision Load (0.7ms)  SELECT  "dmsf_file_revisions".* FROM "dmsf_file_revisions" WHERE "dmsf_file_revisions"."dmsf_file_id" = $1 AND "dmsf_file_revisions"."deleted" = $2  ORDER BY dmsf_file_revisions.major_version DESC, dmsf_file_revisions.minor_version DESC, dmsf_file_revisions.updated_at DESC LIMIT 1  [["dmsf_file_id", 7], ["deleted", "f"]]
  CACHE (0.1ms)  SELECT  "projects".* FROM "projects" WHERE "projects"."id" = $1 LIMIT 1  [["id", 5]]
  DmsfFileRevision Load (0.6ms)  SELECT  "dmsf_file_revisions".* FROM "dmsf_file_revisions" WHERE "dmsf_file_revisions"."dmsf_file_id" = $1 AND "dmsf_file_revisions"."deleted" = $2  ORDER BY dmsf_file_revisions.major_version DESC, dmsf_file_revisions.minor_version DESC, dmsf_file_revisions.updated_at DESC LIMIT 1  [["dmsf_file_id", 6], ["deleted", "f"]]
  CACHE (0.0ms)  SELECT  "projects".* FROM "projects" WHERE "projects"."id" = $1 LIMIT 1  [["id", 5]]
  CACHE (0.0ms)  SELECT  "projects".* FROM "projects" WHERE "projects"."id" = $1 LIMIT 1  [["id", 5]]
  CACHE (0.0ms)  SELECT  "projects".* FROM "projects" WHERE "projects"."id" = $1 LIMIT 1  [["id", 5]]
  Rendered search/index.html.erb within layouts/base (79.1ms)
  EnabledModule Load (0.8ms)  SELECT "enabled_modules".* FROM "enabled_modules" WHERE "enabled_modules"."project_id" = $1  [["project_id", 5]]
  Rendered plugins/redmine_code_review/app/views/code_review/_html_header.html.erb (3.4ms)
  Rendered plugins/redmine_create_wiki_page/app/views/create_wiki_page/_init_create_wiki_page.erb (0.1ms)
  Rendered inline template (1.2ms)
redmine_highlightjs2: supported browser: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:48.0) Gecko/20100101 Firefox/48.0
  Rendered plugins/redmine_pretend/app/views/user/_unpretend.html.erb (0.1ms)
  Attachment Load (0.6ms)  SELECT  "attachments".* FROM "attachments" WHERE "attachments"."container_id" = $1 AND "attachments"."container_type" = $2 AND (attachments.description = 'avatar') LIMIT 1  [["container_id", 7], ["container_type", "Principal"]]
  Attachment Load (0.5ms)  SELECT  "attachments".* FROM "attachments" WHERE "attachments"."container_id" = $1 AND "attachments"."container_type" = $2 AND "attachments"."description" = $3  ORDER BY attachments.created_on LIMIT 1  [["container_id", 7], ["container_type", "Principal"], ["description", "avatar"]]
  EmailAddress Load (0.5ms)  SELECT  "email_addresses".* FROM "email_addresses" WHERE "email_addresses"."user_id" = $1 AND "email_addresses"."is_default" = $2 LIMIT 1  [["user_id", 7], ["is_default", "t"]]
  Project Load (0.6ms)  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" = $2  [["user_id", 7], ["status", 1]]
   (2.0ms)  SELECT COUNT(*) FROM "versions" INNER JOIN "projects" ON "projects"."id" = "versions"."project_id" WHERE (projects.id = 5 OR (projects.status <> 9 AND ( versions.sharing = 'system' OR (projects.lft >= 11 AND projects.rgt <= 12 AND versions.sharing = 'tree') OR (projects.lft < 11 AND projects.rgt > 12 AND versions.sharing IN ('hierarchy', 'descendants')) OR (projects.lft > 11 AND projects.rgt < 12 AND versions.sharing = 'hierarchy'))))
  Tracker Exists (1.1ms)  SELECT  1 AS one FROM "trackers" INNER JOIN "projects_trackers" ON "trackers"."id" = "projects_trackers"."tracker_id" WHERE "projects_trackers"."project_id" = $1 LIMIT 1  [["project_id", 5]]
  Wiki Load (0.9ms)  SELECT  "wikis".* FROM "wikis" WHERE "wikis"."project_id" = $1 LIMIT 1  [["project_id", 5]]
  Rendered plugins/redmine_code_review/app/views/code_review/_body_bottom.html.erb (0.7ms)
Completed 200 OK in 2019ms (Views: 161.5ms | ActiveRecord: 1734.6ms)
Started GET "/redmine/search?utf8=%E2%9C%93&q=BUSINESS&scope=all&all_words=&all_words=1&titles_only=&issues=1&news=1&documents=1&changesets=1&wiki_pages=1&messages=1&projects=1&contacts=1&dmsf_files=1&dmsf_folders=1&operations=1&attachments=0&options=0&commit=Submit" for 172.17.0.198 at 2016-08-31 14:42:19 +0800
Processing by SearchController#index as HTML
  Parameters: {"utf8"=>"✓", "q"=>"BUSINESS", "scope"=>"all", "all_words"=>"1", "titles_only"=>"", "issues"=>"1", "news"=>"1", "documents"=>"1", "changesets"=>"1", "wiki_pages"=>"1", "messages"=>"1", "projects"=>"1", "contacts"=>"1", "dmsf_files"=>"1", "dmsf_folders"=>"1", "operations"=>"1", "attachments"=>"0", "options"=>"0", "commit"=>"Submit"}
  SQL (2.9ms)  UPDATE "tokens" SET "updated_on" = '2016-08-31 14:42:19.128743' WHERE "tokens"."user_id" = $1 AND "tokens"."value" = $2 AND "tokens"."action" = $3  [["user_id", 7], ["value", "39ffd10e6af0ec67c3baba5b3a464f8a41f31e4c"], ["action", "session"]]
   (1.0ms)  SELECT MAX("settings"."updated_on") FROM "settings"
  User Load (0.8ms)  SELECT  "users".* FROM "users" WHERE "users"."type" IN ('User', 'AnonymousUser') AND "users"."status" = $1 AND "users"."id" = $2 LIMIT 1  [["status", 1], ["id", 7]]
  Current user: shemgp (id=7)
   (0.7ms)  SELECT MAX("contacts_settings"."updated_on") FROM "contacts_settings"
   (2.0ms)  SELECT DISTINCT "issues"."created_on", "issues"."id" FROM "issues" INNER JOIN "projects" ON "projects"."id" = "issues"."project_id" WHERE (projects.status <> 9 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='issue_tracking')) AND (((subject ILIKE '%BUSINESS%') OR (issues.description ILIKE '%BUSINESS%')))  ORDER BY "issues"."created_on" DESC, "issues"."id" DESC
  CustomField Load (0.6ms)  SELECT "custom_fields".* FROM "custom_fields" WHERE "custom_fields"."type" = $1 AND "custom_fields"."searchable" = $2  [["type", "IssueCustomField"], ["searchable", "t"]]
   (2.7ms)  SELECT DISTINCT "issues"."created_on", "issues"."id" FROM "issues" INNER JOIN "projects" ON "projects"."id" = "issues"."project_id" INNER JOIN "journals" ON "journals"."journalized_id" = "issues"."id" AND "journals"."journalized_type" = $1 WHERE (projects.status <> 9 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='issue_tracking')) AND (journals.private_notes = 'f' OR (projects.status <> 9 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='issue_tracking'))) AND (((journals.notes ILIKE '%BUSINESS%')))  ORDER BY "issues"."created_on" DESC, "issues"."id" DESC  [["journalized_type", "Issue"]]
   (1.9ms)  SELECT DISTINCT "news"."created_on", "news"."id" FROM "news" INNER JOIN "projects" ON "projects"."id" = "news"."project_id" WHERE (projects.status <> 9 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='news')) AND (((title ILIKE '%BUSINESS%') OR (summary ILIKE '%BUSINESS%') OR (news.description ILIKE '%BUSINESS%')))  ORDER BY "news"."created_on" DESC, "news"."id" DESC
   (1.8ms)  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 ILIKE '%BUSINESS%') OR (documents.description ILIKE '%BUSINESS%')))  ORDER BY "documents"."created_on" DESC, "documents"."id" DESC
  CustomField Load (0.7ms)  SELECT "custom_fields".* FROM "custom_fields" WHERE "custom_fields"."type" = $1 AND "custom_fields"."searchable" = $2  [["type", "DocumentCustomField"], ["searchable", "t"]]
   (3.9ms)  SELECT DISTINCT "changesets"."committed_on", "changesets"."id" FROM "changesets" INNER JOIN "repositories" ON "repositories"."id" = "changesets"."repository_id" INNER JOIN "projects" ON "projects"."id" = "repositories"."project_id" WHERE (projects.status <> 9 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='repository')) AND (((comments ILIKE '%BUSINESS%')))  ORDER BY "changesets"."committed_on" DESC, "changesets"."id" DESC
   (3.6ms)  SELECT DISTINCT "wiki_pages"."created_on", "wiki_pages"."id" FROM "wiki_pages" INNER JOIN "wiki_contents" ON "wiki_contents"."page_id" = "wiki_pages"."id" INNER JOIN "wikis" ON "wikis"."id" = "wiki_pages"."wiki_id" INNER JOIN "projects" ON "projects"."id" = "wikis"."project_id" WHERE (projects.status <> 9 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='wiki')) AND (((title ILIKE '%BUSINESS%') OR (wiki_contents.text ILIKE '%BUSINESS%')))  ORDER BY "wiki_pages"."created_on" DESC, "wiki_pages"."id" DESC
   (2.2ms)  SELECT DISTINCT "messages"."created_on", "messages"."id" FROM "messages" INNER JOIN "boards" ON "boards"."id" = "messages"."board_id" INNER JOIN "projects" ON "projects"."id" = "boards"."project_id" WHERE (projects.status <> 9 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='boards')) AND (((subject ILIKE '%BUSINESS%') OR (content ILIKE '%BUSINESS%')))  ORDER BY "messages"."created_on" DESC, "messages"."id" DESC
   (1.2ms)  SELECT DISTINCT "projects"."created_on", "projects"."id" FROM "projects" WHERE (projects.status <> 9) AND (((name ILIKE '%BUSINESS%') OR (identifier ILIKE '%BUSINESS%') OR (description ILIKE '%BUSINESS%')))  ORDER BY "projects"."created_on" DESC, "projects"."id" DESC
  CustomField Load (0.7ms)  SELECT "custom_fields".* FROM "custom_fields" WHERE "custom_fields"."type" = $1 AND "custom_fields"."searchable" = $2  [["type", "ProjectCustomField"], ["searchable", "t"]]
  User Load (1.1ms)  SELECT  "users".* FROM "users" WHERE "users"."type" IN ('User', 'AnonymousUser') AND "users"."id" = $1 LIMIT 1  [["id", 7]]
  Group Load (3.6ms)  SELECT "users".* FROM "users" INNER JOIN "groups_users" ON "users"."id" = "groups_users"."group_id" WHERE "users"."type" IN ('Group', 'GroupBuiltin', 'GroupAnonymous', 'GroupNonMember') AND "groups_users"."user_id" = $1  [["user_id", 7]]
   (1.4ms)  SELECT "projects"."id" FROM "projects" WHERE (projects.status = 1 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='contacts'))
  CACHE (0.0ms)  SELECT "projects"."id" FROM "projects" WHERE (projects.status = 1 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='contacts'))
   (2.9ms)  SELECT DISTINCT "contacts"."created_on", "contacts"."id" FROM "contacts" LEFT OUTER JOIN "contacts_projects" ON "contacts_projects"."contact_id" = "contacts"."id" LEFT OUTER JOIN "projects" ON "projects"."id" = "contacts_projects"."project_id" LEFT OUTER JOIN "addresses" ON "addresses"."addressable_id" = "contacts"."id" AND "addresses"."address_type" = $1 AND "addresses"."addressable_type" = $2 LEFT OUTER JOIN "notes" ON "notes"."source_id" = "contacts"."id" AND "notes"."source_type" = $3 WHERE ((projects.id <> -1 ) AND ((contacts.visibility = 1) OR (projects.id IN (1,5)) )) AND (((contacts.first_name ILIKE '%BUSINESS%') OR (contacts.middle_name ILIKE '%BUSINESS%') OR (contacts.last_name ILIKE '%BUSINESS%') OR (contacts.company ILIKE '%BUSINESS%') OR (contacts.email ILIKE '%BUSINESS%') OR (addresses.full_address ILIKE '%BUSINESS%') OR (contacts.background ILIKE '%BUSINESS%') OR (notes.content ILIKE '%BUSINESS%')))  ORDER BY "contacts"."created_on" DESC, "contacts"."id" DESC  [["address_type", "business"], ["addressable_type", "Contact"], ["source_type", "Contact"]]
  DmsfFile Load (2.6ms)  SELECT DISTINCT "dmsf_files".* FROM "dmsf_files" INNER JOIN "projects" ON "projects"."id" = "dmsf_files"."project_id" INNER JOIN "dmsf_file_revisions" ON "dmsf_file_revisions"."dmsf_file_id" = "dmsf_files"."id" WHERE "dmsf_files"."deleted" = $1 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 '%business%') OR (LOWER(dmsf_file_revisions.title) LIKE '%business%') OR (LOWER(dmsf_file_revisions.description) LIKE '%business%') OR (LOWER(dmsf_file_revisions.comment) LIKE '%business%')))  [["deleted", "f"]]
   (1.8ms)  SELECT DISTINCT "dmsf_folders"."updated_at", "dmsf_folders"."id" FROM "dmsf_folders" INNER JOIN "projects" ON "projects"."id" = "dmsf_folders"."project_id" WHERE (projects.status <> 9 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='dmsf')) AND (((dmsf_folders.title ILIKE '%BUSINESS%') OR (dmsf_folders.description ILIKE '%BUSINESS%')))  ORDER BY "dmsf_folders"."updated_at" DESC, "dmsf_folders"."id" DESC
  CustomField Load (0.6ms)  SELECT "custom_fields".* FROM "custom_fields" WHERE "custom_fields"."type" = $1 AND "custom_fields"."searchable" = $2  [["type", "DmsfFolderCustomField"], ["searchable", "t"]]
   (1.9ms)  SELECT DISTINCT "operations"."operation_date", "operations"."id" FROM "operations" INNER JOIN "accounts" ON "accounts"."id" = "operations"."account_id" INNER JOIN "projects" ON "projects"."id" = "accounts"."project_id" WHERE (projects.status = 1 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='finance')) AND (((operations.description ILIKE '%BUSINESS%')))  ORDER BY "operations"."operation_date" DESC, "operations"."id" DESC
  Member Exists (1.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  [["user_id", 7]]
  Rendered search/index.html.erb within layouts/base (15.4ms)
  UserPreference Load (0.7ms)  SELECT  "user_preferences".* FROM "user_preferences" WHERE "user_preferences"."user_id" = $1 LIMIT 1  [["user_id", 7]]
  Rendered plugins/redmine_code_review/app/views/code_review/_html_header.html.erb (0.1ms)
  Rendered plugins/redmine_create_wiki_page/app/views/create_wiki_page/_init_create_wiki_page.erb (0.1ms)
  Rendered inline template (1.6ms)
redmine_highlightjs2: supported browser: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:48.0) Gecko/20100101 Firefox/48.0
  Rendered plugins/redmine_pretend/app/views/user/_unpretend.html.erb (0.1ms)
  Attachment Load (0.8ms)  SELECT  "attachments".* FROM "attachments" WHERE "attachments"."container_id" = $1 AND "attachments"."container_type" = $2 AND (attachments.description = 'avatar') LIMIT 1  [["container_id", 7], ["container_type", "Principal"]]
  Attachment Load (0.7ms)  SELECT  "attachments".* FROM "attachments" WHERE "attachments"."container_id" = $1 AND "attachments"."container_type" = $2 AND "attachments"."description" = $3  ORDER BY attachments.created_on LIMIT 1  [["container_id", 7], ["container_type", "Principal"], ["description", "avatar"]]
  EmailAddress Load (0.6ms)  SELECT  "email_addresses".* FROM "email_addresses" WHERE "email_addresses"."user_id" = $1 AND "email_addresses"."is_default" = $2 LIMIT 1  [["user_id", 7], ["is_default", "t"]]
  Project Load (0.9ms)  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" = $2  [["user_id", 7], ["status", 1]]
  Rendered plugins/redmine_code_review/app/views/code_review/_body_bottom.html.erb (0.1ms)
Completed 200 OK in 210ms (Views: 83.3ms | ActiveRecord: 47.5ms)
Started GET "/redmine/search?utf8=%E2%9C%93&q=Philippines" for 172.17.0.198 at 2016-08-31 14:42:27 +0800
Processing by SearchController#index as HTML
  Parameters: {"utf8"=>"✓", "q"=>"Philippines"}
  SQL (304.7ms)  UPDATE "tokens" SET "updated_on" = '2016-08-31 14:42:27.799283' WHERE "tokens"."user_id" = $1 AND "tokens"."value" = $2 AND "tokens"."action" = $3  [["user_id", 7], ["value", "39ffd10e6af0ec67c3baba5b3a464f8a41f31e4c"], ["action", "session"]]
   (1.2ms)  SELECT MAX("settings"."updated_on") FROM "settings"
  User Load (0.8ms)  SELECT  "users".* FROM "users" WHERE "users"."type" IN ('User', 'AnonymousUser') AND "users"."status" = $1 AND "users"."id" = $2 LIMIT 1  [["status", 1], ["id", 7]]
  Current user: shemgp (id=7)
   (0.9ms)  SELECT MAX("contacts_settings"."updated_on") FROM "contacts_settings"
   (2.0ms)  SELECT DISTINCT "issues"."created_on", "issues"."id" FROM "issues" INNER JOIN "projects" ON "projects"."id" = "issues"."project_id" WHERE (projects.status <> 9 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='issue_tracking')) AND (((subject ILIKE '%Philippines%') OR (issues.description ILIKE '%Philippines%')))  ORDER BY "issues"."created_on" DESC, "issues"."id" DESC
  CustomField Load (0.6ms)  SELECT "custom_fields".* FROM "custom_fields" WHERE "custom_fields"."type" = $1 AND "custom_fields"."searchable" = $2  [["type", "IssueCustomField"], ["searchable", "t"]]
   (2.8ms)  SELECT DISTINCT "issues"."created_on", "issues"."id" FROM "issues" INNER JOIN "projects" ON "projects"."id" = "issues"."project_id" INNER JOIN "journals" ON "journals"."journalized_id" = "issues"."id" AND "journals"."journalized_type" = $1 WHERE (projects.status <> 9 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='issue_tracking')) AND (journals.private_notes = 'f' OR (projects.status <> 9 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='issue_tracking'))) AND (((journals.notes ILIKE '%Philippines%')))  ORDER BY "issues"."created_on" DESC, "issues"."id" DESC  [["journalized_type", "Issue"]]
   (2.0ms)  SELECT DISTINCT "news"."created_on", "news"."id" FROM "news" INNER JOIN "projects" ON "projects"."id" = "news"."project_id" WHERE (projects.status <> 9 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='news')) AND (((title ILIKE '%Philippines%') OR (summary ILIKE '%Philippines%') OR (news.description ILIKE '%Philippines%')))  ORDER BY "news"."created_on" DESC, "news"."id" DESC
   (1.8ms)  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 ILIKE '%Philippines%') OR (documents.description ILIKE '%Philippines%')))  ORDER BY "documents"."created_on" DESC, "documents"."id" DESC
  CustomField Load (0.7ms)  SELECT "custom_fields".* FROM "custom_fields" WHERE "custom_fields"."type" = $1 AND "custom_fields"."searchable" = $2  [["type", "DocumentCustomField"], ["searchable", "t"]]
   (4.0ms)  SELECT DISTINCT "changesets"."committed_on", "changesets"."id" FROM "changesets" INNER JOIN "repositories" ON "repositories"."id" = "changesets"."repository_id" INNER JOIN "projects" ON "projects"."id" = "repositories"."project_id" WHERE (projects.status <> 9 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='repository')) AND (((comments ILIKE '%Philippines%')))  ORDER BY "changesets"."committed_on" DESC, "changesets"."id" DESC
   (4.1ms)  SELECT DISTINCT "wiki_pages"."created_on", "wiki_pages"."id" FROM "wiki_pages" INNER JOIN "wiki_contents" ON "wiki_contents"."page_id" = "wiki_pages"."id" INNER JOIN "wikis" ON "wikis"."id" = "wiki_pages"."wiki_id" INNER JOIN "projects" ON "projects"."id" = "wikis"."project_id" WHERE (projects.status <> 9 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='wiki')) AND (((title ILIKE '%Philippines%') OR (wiki_contents.text ILIKE '%Philippines%')))  ORDER BY "wiki_pages"."created_on" DESC, "wiki_pages"."id" DESC
   (2.3ms)  SELECT DISTINCT "messages"."created_on", "messages"."id" FROM "messages" INNER JOIN "boards" ON "boards"."id" = "messages"."board_id" INNER JOIN "projects" ON "projects"."id" = "boards"."project_id" WHERE (projects.status <> 9 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='boards')) AND (((subject ILIKE '%Philippines%') OR (content ILIKE '%Philippines%')))  ORDER BY "messages"."created_on" DESC, "messages"."id" DESC
   (1.0ms)  SELECT DISTINCT "projects"."created_on", "projects"."id" FROM "projects" WHERE (projects.status <> 9) AND (((name ILIKE '%Philippines%') OR (identifier ILIKE '%Philippines%') OR (description ILIKE '%Philippines%')))  ORDER BY "projects"."created_on" DESC, "projects"."id" DESC
  CustomField Load (0.7ms)  SELECT "custom_fields".* FROM "custom_fields" WHERE "custom_fields"."type" = $1 AND "custom_fields"."searchable" = $2  [["type", "ProjectCustomField"], ["searchable", "t"]]
  User Load (0.7ms)  SELECT  "users".* FROM "users" WHERE "users"."type" IN ('User', 'AnonymousUser') AND "users"."id" = $1 LIMIT 1  [["id", 7]]
  Group Load (4.1ms)  SELECT "users".* FROM "users" INNER JOIN "groups_users" ON "users"."id" = "groups_users"."group_id" WHERE "users"."type" IN ('Group', 'GroupBuiltin', 'GroupAnonymous', 'GroupNonMember') AND "groups_users"."user_id" = $1  [["user_id", 7]]
   (1.5ms)  SELECT "projects"."id" FROM "projects" WHERE (projects.status = 1 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='contacts'))
  CACHE (0.0ms)  SELECT "projects"."id" FROM "projects" WHERE (projects.status = 1 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='contacts'))
   (2.8ms)  SELECT DISTINCT "contacts"."created_on", "contacts"."id" FROM "contacts" LEFT OUTER JOIN "contacts_projects" ON "contacts_projects"."contact_id" = "contacts"."id" LEFT OUTER JOIN "projects" ON "projects"."id" = "contacts_projects"."project_id" LEFT OUTER JOIN "addresses" ON "addresses"."addressable_id" = "contacts"."id" AND "addresses"."address_type" = $1 AND "addresses"."addressable_type" = $2 LEFT OUTER JOIN "notes" ON "notes"."source_id" = "contacts"."id" AND "notes"."source_type" = $3 WHERE ((projects.id <> -1 ) AND ((contacts.visibility = 1) OR (projects.id IN (1,5)) )) AND (((contacts.first_name ILIKE '%Philippines%') OR (contacts.middle_name ILIKE '%Philippines%') OR (contacts.last_name ILIKE '%Philippines%') OR (contacts.company ILIKE '%Philippines%') OR (contacts.email ILIKE '%Philippines%') OR (addresses.full_address ILIKE '%Philippines%') OR (contacts.background ILIKE '%Philippines%') OR (notes.content ILIKE '%Philippines%')))  ORDER BY "contacts"."created_on" DESC, "contacts"."id" DESC  [["address_type", "business"], ["addressable_type", "Contact"], ["source_type", "Contact"]]
  DmsfFile Load (2.6ms)  SELECT DISTINCT "dmsf_files".* FROM "dmsf_files" INNER JOIN "projects" ON "projects"."id" = "dmsf_files"."project_id" INNER JOIN "dmsf_file_revisions" ON "dmsf_file_revisions"."dmsf_file_id" = "dmsf_files"."id" WHERE "dmsf_files"."deleted" = $1 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 '%philippines%') OR (LOWER(dmsf_file_revisions.title) LIKE '%philippines%') OR (LOWER(dmsf_file_revisions.description) LIKE '%philippines%') OR (LOWER(dmsf_file_revisions.comment) LIKE '%philippines%')))  [["deleted", "f"]]
   (1.8ms)  SELECT DISTINCT "dmsf_folders"."updated_at", "dmsf_folders"."id" FROM "dmsf_folders" INNER JOIN "projects" ON "projects"."id" = "dmsf_folders"."project_id" WHERE (projects.status <> 9 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='dmsf')) AND (((dmsf_folders.title ILIKE '%Philippines%') OR (dmsf_folders.description ILIKE '%Philippines%')))  ORDER BY "dmsf_folders"."updated_at" DESC, "dmsf_folders"."id" DESC
  CustomField Load (0.6ms)  SELECT "custom_fields".* FROM "custom_fields" WHERE "custom_fields"."type" = $1 AND "custom_fields"."searchable" = $2  [["type", "DmsfFolderCustomField"], ["searchable", "t"]]
   (1.8ms)  SELECT DISTINCT "operations"."operation_date", "operations"."id" FROM "operations" INNER JOIN "accounts" ON "accounts"."id" = "operations"."account_id" INNER JOIN "projects" ON "projects"."id" = "accounts"."project_id" WHERE (projects.status = 1 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='finance')) AND (((operations.description ILIKE '%Philippines%')))  ORDER BY "operations"."operation_date" DESC, "operations"."id" DESC
  Member Exists (1.1ms)  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  [["user_id", 7]]
  Rendered search/index.html.erb within layouts/base (12.0ms)
  UserPreference Load (1.1ms)  SELECT  "user_preferences".* FROM "user_preferences" WHERE "user_preferences"."user_id" = $1 LIMIT 1  [["user_id", 7]]
  Rendered plugins/redmine_code_review/app/views/code_review/_html_header.html.erb (0.1ms)
  Rendered plugins/redmine_create_wiki_page/app/views/create_wiki_page/_init_create_wiki_page.erb (0.1ms)
  Rendered inline template (1.2ms)
redmine_highlightjs2: supported browser: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:48.0) Gecko/20100101 Firefox/48.0
  Rendered plugins/redmine_pretend/app/views/user/_unpretend.html.erb (0.1ms)
  Attachment Load (0.7ms)  SELECT  "attachments".* FROM "attachments" WHERE "attachments"."container_id" = $1 AND "attachments"."container_type" = $2 AND (attachments.description = 'avatar') LIMIT 1  [["container_id", 7], ["container_type", "Principal"]]
  Attachment Load (0.8ms)  SELECT  "attachments".* FROM "attachments" WHERE "attachments"."container_id" = $1 AND "attachments"."container_type" = $2 AND "attachments"."description" = $3  ORDER BY attachments.created_on LIMIT 1  [["container_id", 7], ["container_type", "Principal"], ["description", "avatar"]]
  EmailAddress Load (0.6ms)  SELECT  "email_addresses".* FROM "email_addresses" WHERE "email_addresses"."user_id" = $1 AND "email_addresses"."is_default" = $2 LIMIT 1  [["user_id", 7], ["is_default", "t"]]
  Project Load (1.0ms)  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" = $2  [["user_id", 7], ["status", 1]]
  Rendered pStarted GET "/redmine/projects/optimize-forms/search?utf8=%E2%9C%93&q=Request&scope=&all_words=&all_words=1&titles_only=&issues=1&wiki_pages=1&contacts=1&dmsf_files=1&dmsf_folders=1&attachments=0&options=0&commit=Submit" for 172.17.0.198 at 2016-08-31 14:42:03 +0800
Processing by SearchController#index as HTML
  Parameters: {"utf8"=>"✓", "q"=>"Request", "scope"=>"", "all_words"=>"1", "titles_only"=>"", "issues"=>"1", "wiki_pages"=>"1", "contacts"=>"1", "dmsf_files"=>"1", "dmsf_folders"=>"1", "attachments"=>"0", "options"=>"0", "commit"=>"Submit", "id"=>"optimize-forms"}
  SQL (1693.6ms)  UPDATE "tokens" SET "updated_on" = '2016-08-31 14:42:03.987013' WHERE "tokens"."user_id" = $1 AND "tokens"."value" = $2 AND "tokens"."action" = $3  [["user_id", 7], ["value", "39ffd10e6af0ec67c3baba5b3a464f8a41f31e4c"], ["action", "session"]]
   (1.3ms)  SELECT MAX("settings"."updated_on") FROM "settings"
  User Load (0.7ms)  SELECT  "users".* FROM "users" WHERE "users"."type" IN ('User', 'AnonymousUser') AND "users"."status" = $1 AND "users"."id" = $2 LIMIT 1  [["status", 1], ["id", 7]]
  Current user: shemgp (id=7)
   (0.7ms)  SELECT MAX("contacts_settings"."updated_on") FROM "contacts_settings"
  Project Load (0.7ms)  SELECT  "projects".* FROM "projects" WHERE "projects"."identifier" = $1 LIMIT 1  [["identifier", "optimize-forms"]]
   (0.6ms)  SELECT "enabled_modules"."name" FROM "enabled_modules" WHERE "enabled_modules"."project_id" = $1  [["project_id", 5]]
   (1.6ms)  SELECT DISTINCT "issues"."created_on", "issues"."id" FROM "issues" INNER JOIN "projects" ON "projects"."id" = "issues"."project_id" WHERE (projects.status <> 9 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='issue_tracking')) AND (issues.project_id IN (5)) AND (((subject ILIKE '%Request%') OR (issues.description ILIKE '%Request%')))  ORDER BY "issues"."created_on" DESC, "issues"."id" DESC
  CustomField Load (0.5ms)  SELECT "custom_fields".* FROM "custom_fields" WHERE "custom_fields"."type" = $1 AND "custom_fields"."searchable" = $2  [["type", "IssueCustomField"], ["searchable", "t"]]
   (1.9ms)  SELECT DISTINCT "issues"."created_on", "issues"."id" FROM "issues" INNER JOIN "projects" ON "projects"."id" = "issues"."project_id" INNER JOIN "journals" ON "journals"."journalized_id" = "issues"."id" AND "journals"."journalized_type" = $1 WHERE (projects.status <> 9 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='issue_tracking')) AND (issues.project_id IN (5)) AND (journals.private_notes = 'f' OR (projects.status <> 9 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='issue_tracking'))) AND (((journals.notes ILIKE '%Request%')))  ORDER BY "issues"."created_on" DESC, "issues"."id" DESC  [["journalized_type", "Issue"]]
   (2.1ms)  SELECT DISTINCT "wiki_pages"."created_on", "wiki_pages"."id" FROM "wiki_pages" INNER JOIN "wiki_contents" ON "wiki_contents"."page_id" = "wiki_pages"."id" INNER JOIN "wikis" ON "wikis"."id" = "wiki_pages"."wiki_id" INNER JOIN "projects" ON "projects"."id" = "wikis"."project_id" WHERE (projects.status <> 9 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='wiki')) AND (wikis.project_id IN (5)) AND (((title ILIKE '%Request%') OR (wiki_contents.text ILIKE '%Request%')))  ORDER BY "wiki_pages"."created_on" DESC, "wiki_pages"."id" DESC
  User Load (0.9ms)  SELECT  "users".* FROM "users" WHERE "users"."type" IN ('User', 'AnonymousUser') AND "users"."id" = $1 LIMIT 1  [["id", 7]]
  Group Load (3.5ms)  SELECT "users".* FROM "users" INNER JOIN "groups_users" ON "users"."id" = "groups_users"."group_id" WHERE "users"."type" IN ('Group', 'GroupBuiltin', 'GroupAnonymous', 'GroupNonMember') AND "groups_users"."user_id" = $1  [["user_id", 7]]
   (1.3ms)  SELECT "projects"."id" FROM "projects" WHERE (projects.status = 1 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='contacts'))
  CACHE (0.0ms)  SELECT "projects"."id" FROM "projects" WHERE (projects.status = 1 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='contacts'))
   (2.4ms)  SELECT DISTINCT "contacts"."created_on", "contacts"."id" FROM "contacts" LEFT OUTER JOIN "contacts_projects" ON "contacts_projects"."contact_id" = "contacts"."id" LEFT OUTER JOIN "projects" ON "projects"."id" = "contacts_projects"."project_id" LEFT OUTER JOIN "addresses" ON "addresses"."addressable_id" = "contacts"."id" AND "addresses"."address_type" = $1 AND "addresses"."addressable_type" = $2 LEFT OUTER JOIN "notes" ON "notes"."source_id" = "contacts"."id" AND "notes"."source_type" = $3 WHERE ((projects.id <> -1 ) AND ((contacts.visibility = 1) OR (projects.id IN (1,5)) )) AND (projects.id IN (5)) AND (((contacts.first_name ILIKE '%Request%') OR (contacts.middle_name ILIKE '%Request%') OR (contacts.last_name ILIKE '%Request%') OR (contacts.company ILIKE '%Request%') OR (contacts.email ILIKE '%Request%') OR (addresses.full_address ILIKE '%Request%') OR (contacts.background ILIKE '%Request%') OR (notes.content ILIKE '%Request%')))  ORDER BY "contacts"."created_on" DESC, "contacts"."id" DESC  [["address_type", "business"], ["addressable_type", "Contact"], ["source_type", "Contact"]]
  DmsfFile Load (2.2ms)  SELECT DISTINCT "dmsf_files".* FROM "dmsf_files" INNER JOIN "projects" ON "projects"."id" = "dmsf_files"."project_id" INNER JOIN "dmsf_file_revisions" ON "dmsf_file_revisions"."dmsf_file_id" = "dmsf_files"."id" WHERE "dmsf_files"."deleted" = $1 AND (projects.status <> 9 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='dmsf') AND dmsf_files.project_id IN (5)) AND (((LOWER(dmsf_files.name) LIKE '%request%') OR (LOWER(dmsf_file_revisions.title) LIKE '%request%') OR (LOWER(dmsf_file_revisions.description) LIKE '%request%') OR (LOWER(dmsf_file_revisions.comment) LIKE '%request%')))  [["deleted", "f"]]
  DmsfFile Load (0.5ms)  SELECT  "dmsf_files".* FROM "dmsf_files" WHERE "dmsf_files"."deleted" = $1 AND "dmsf_files"."id" = $2  ORDER BY "dmsf_files"."id" ASC LIMIT 1  [["deleted", "f"], ["id", 10]]
  Project Load (0.7ms)  SELECT  "projects".* FROM "projects" WHERE "projects"."id" = $1 LIMIT 1  [["id", 5]]
   (0.5ms)  SELECT "enabled_modules"."name" FROM "enabled_modules" WHERE "enabled_modules"."project_id" = $1  [["project_id", 5]]
  DmsfFile Load (0.5ms)  SELECT  "dmsf_files".* FROM "dmsf_files" WHERE "dmsf_files"."deleted" = $1 AND "dmsf_files"."id" = $2  ORDER BY "dmsf_files"."id" ASC LIMIT 1  [["deleted", "f"], ["id", 16]]
  CACHE (0.0ms)  SELECT  "projects".* FROM "projects" WHERE "projects"."id" = $1 LIMIT 1  [["id", 5]]
  CACHE (0.1ms)  SELECT "enabled_modules"."name" FROM "enabled_modules" WHERE "enabled_modules"."project_id" = $1  [["project_id", 5]]
  DmsfFile Load (0.6ms)  SELECT  "dmsf_files".* FROM "dmsf_files" WHERE "dmsf_files"."deleted" = $1 AND "dmsf_files"."id" = $2  ORDER BY "dmsf_files"."id" ASC LIMIT 1  [["deleted", "f"], ["id", 5]]
  CACHE (0.0ms)  SELECT  "projects".* FROM "projects" WHERE "projects"."id" = $1 LIMIT 1  [["id", 5]]
  CACHE (0.0ms)  SELECT "enabled_modules"."name" FROM "enabled_modules" WHERE "enabled_modules"."project_id" = $1  [["project_id", 5]]
  DmsfFile Load (0.5ms)  SELECT  "dmsf_files".* FROM "dmsf_files" WHERE "dmsf_files"."deleted" = $1 AND "dmsf_files"."id" = $2  ORDER BY "dmsf_files"."id" ASC LIMIT 1  [["deleted", "f"], ["id", 3]]
  CACHE (0.0ms)  SELECT  "projects".* FROM "projects" WHERE "projects"."id" = $1 LIMIT 1  [["id", 5]]
  CACHE (0.0ms)  SELECT "enabled_modules"."name" FROM "enabled_modules" WHERE "enabled_modules"."project_id" = $1  [["project_id", 5]]
  DmsfFile Load (0.5ms)  SELECT  "dmsf_files".* FROM "dmsf_files" WHERE "dmsf_files"."deleted" = $1 AND "dmsf_files"."id" = $2  ORDER BY "dmsf_files"."id" ASC LIMIT 1  [["deleted", "f"], ["id", 4]]
  CACHE (0.0ms)  SELECT  "projects".* FROM "projects" WHERE "projects"."id" = $1 LIMIT 1  [["id", 5]]
  CACHE (0.1ms)  SELECT "enabled_modules"."name" FROM "enabled_modules" WHERE "enabled_modules"."project_id" = $1  [["project_id", 5]]
  DmsfFile Load (0.6ms)  SELECT  "dmsf_files".* FROM "dmsf_files" WHERE "dmsf_files"."deleted" = $1 AND "dmsf_files"."id" = $2  ORDER BY "dmsf_files"."id" ASC LIMIT 1  [["deleted", "f"], ["id", 12]]
  CACHE (0.0ms)  SELECT  "projects".* FROM "projects" WHERE "projects"."id" = $1 LIMIT 1  [["id", 5]]
  CACHE (0.0ms)  SELECT "enabled_modules"."name" FROM "enabled_modules" WHERE "enabled_modules"."project_id" = $1  [["project_id", 5]]
   (1.8ms)  SELECT DISTINCT "dmsf_folders"."updated_at", "dmsf_folders"."id" FROM "dmsf_folders" INNER JOIN "projects" ON "projects"."id" = "dmsf_folders"."project_id" WHERE (projects.status <> 9 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='dmsf')) AND (project_id IN (5)) AND (((dmsf_folders.title ILIKE '%Request%') OR (dmsf_folders.description ILIKE '%Request%')))  ORDER BY "dmsf_folders"."updated_at" DESC, "dmsf_folders"."id" DESC
  CustomField Load (0.5ms)  SELECT "custom_fields".* FROM "custom_fields" WHERE "custom_fields"."type" = $1 AND "custom_fields"."searchable" = $2  [["type", "DmsfFolderCustomField"], ["searchable", "t"]]
  DmsfFile Load (1.0ms)  SELECT "dmsf_files".* FROM "dmsf_files" WHERE "dmsf_files"."id" IN (21, 16, 12, 10, 9, 7, 6, 5, 4, 3)
  Member Exists (1.0ms)  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  [["user_id", 7]]
  CACHE (0.0ms)  SELECT  "projects".* FROM "projects" WHERE "projects"."id" = $1 LIMIT 1  [["id", 5]]
  DmsfFileRevision Load (1.0ms)  SELECT  "dmsf_file_revisions".* FROM "dmsf_file_revisions" WHERE "dmsf_file_revisions"."dmsf_file_id" = $1 AND "dmsf_file_revisions"."deleted" = $2  ORDER BY dmsf_file_revisions.major_version DESC, dmsf_file_revisions.minor_version DESC, dmsf_file_revisions.updated_at DESC LIMIT 1  [["dmsf_file_id", 21], ["deleted", "f"]]
  UserPreference Load (0.5ms)  SELECT  "user_preferences".* FROM "user_preferences" WHERE "user_preferences"."user_id" = $1 LIMIT 1  [["user_id", 7]]
  CACHE (0.0ms)  SELECT  "projects".* FROM "projects" WHERE "projects"."id" = $1 LIMIT 1  [["id", 5]]
  CACHE (0.0ms)  SELECT  "projects".* FROM "projects" WHERE "projects"."id" = $1 LIMIT 1  [["id", 5]]
  CACHE (0.0ms)  SELECT  "projects".* FROM "projects" WHERE "projects"."id" = $1 LIMIT 1  [["id", 5]]
  CACHE (0.0ms)  SELECT  "projects".* FROM "projects" WHERE "projects"."id" = $1 LIMIT 1  [["id", 5]]
  DmsfFileRevision Load (1.0ms)  SELECT  "dmsf_file_revisions".* FROM "dmsf_file_revisions" WHERE "dmsf_file_revisions"."dmsf_file_id" = $1 AND "dmsf_file_revisions"."deleted" = $2  ORDER BY dmsf_file_revisions.major_version DESC, dmsf_file_revisions.minor_version DESC, dmsf_file_revisions.updated_at DESC LIMIT 1  [["dmsf_file_id", 9], ["deleted", "f"]]
  CACHE (0.0ms)  SELECT  "projects".* FROM "projects" WHERE "projects"."id" = $1 LIMIT 1  [["id", 5]]
  DmsfFileRevision Load (0.7ms)  SELECT  "dmsf_file_revisions".* FROM "dmsf_file_revisions" WHERE "dmsf_file_revisions"."dmsf_file_id" = $1 AND "dmsf_file_revisions"."deleted" = $2  ORDER BY dmsf_file_revisions.major_version DESC, dmsf_file_revisions.minor_version DESC, dmsf_file_revisions.updated_at DESC LIMIT 1  [["dmsf_file_id", 7], ["deleted", "f"]]
  CACHE (0.1ms)  SELECT  "projects".* FROM "projects" WHERE "projects"."id" = $1 LIMIT 1  [["id", 5]]
  DmsfFileRevision Load (0.6ms)  SELECT  "dmsf_file_revisions".* FROM "dmsf_file_revisions" WHERE "dmsf_file_revisions"."dmsf_file_id" = $1 AND "dmsf_file_revisions"."deleted" = $2  ORDER BY dmsf_file_revisions.major_version DESC, dmsf_file_revisions.minor_version DESC, dmsf_file_revisions.updated_at DESC LIMIT 1  [["dmsf_file_id", 6], ["deleted", "f"]]
  CACHE (0.0ms)  SELECT  "projects".* FROM "projects" WHERE "projects"."id" = $1 LIMIT 1  [["id", 5]]
  CACHE (0.0ms)  SELECT  "projects".* FROM "projects" WHERE "projects"."id" = $1 LIMIT 1  [["id", 5]]
  CACHE (0.0ms)  SELECT  "projects".* FROM "projects" WHERE "projects"."id" = $1 LIMIT 1  [["id", 5]]
  Rendered search/index.html.erb within layouts/base (79.1ms)
  EnabledModule Load (0.8ms)  SELECT "enabled_modules".* FROM "enabled_modules" WHERE "enabled_modules"."project_id" = $1  [["project_id", 5]]
  Rendered plugins/redmine_code_review/app/views/code_review/_html_header.html.erb (3.4ms)
  Rendered plugins/redmine_create_wiki_page/app/views/create_wiki_page/_init_create_wiki_page.erb (0.1ms)
  Rendered inline template (1.2ms)
redmine_highlightjs2: supported browser: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:48.0) Gecko/20100101 Firefox/48.0
  Rendered plugins/redmine_pretend/app/views/user/_unpretend.html.erb (0.1ms)
  Attachment Load (0.6ms)  SELECT  "attachments".* FROM "attachments" WHERE "attachments"."container_id" = $1 AND "attachments"."container_type" = $2 AND (attachments.description = 'avatar') LIMIT 1  [["container_id", 7], ["container_type", "Principal"]]
  Attachment Load (0.5ms)  SELECT  "attachments".* FROM "attachments" WHERE "attachments"."container_id" = $1 AND "attachments"."container_type" = $2 AND "attachments"."description" = $3  ORDER BY attachments.created_on LIMIT 1  [["container_id", 7], ["container_type", "Principal"], ["description", "avatar"]]
  EmailAddress Load (0.5ms)  SELECT  "email_addresses".* FROM "email_addresses" WHERE "email_addresses"."user_id" = $1 AND "email_addresses"."is_default" = $2 LIMIT 1  [["user_id", 7], ["is_default", "t"]]
  Project Load (0.6ms)  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" = $2  [["user_id", 7], ["status", 1]]
   (2.0ms)  SELECT COUNT(*) FROM "versions" INNER JOIN "projects" ON "projects"."id" = "versions"."project_id" WHERE (projects.id = 5 OR (projects.status <> 9 AND ( versions.sharing = 'system' OR (projects.lft >= 11 AND projects.rgt <= 12 AND versions.sharing = 'tree') OR (projects.lft < 11 AND projects.rgt > 12 AND versions.sharing IN ('hierarchy', 'descendants')) OR (projects.lft > 11 AND projects.rgt < 12 AND versions.sharing = 'hierarchy'))))
  Tracker Exists (1.1ms)  SELECT  1 AS one FROM "trackers" INNER JOIN "projects_trackers" ON "trackers"."id" = "projects_trackers"."tracker_id" WHERE "projects_trackers"."project_id" = $1 LIMIT 1  [["project_id", 5]]
  Wiki Load (0.9ms)  SELECT  "wikis".* FROM "wikis" WHERE "wikis"."project_id" = $1 LIMIT 1  [["project_id", 5]]
  Rendered plugins/redmine_code_review/app/views/code_review/_body_bottom.html.erb (0.7ms)
Completed 200 OK in 2019ms (Views: 161.5ms | ActiveRecord: 1734.6ms)
Started GET "/redmine/search?utf8=%E2%9C%93&q=BUSINESS&scope=all&all_words=&all_words=1&titles_only=&issues=1&news=1&documents=1&changesets=1&wiki_pages=1&messages=1&projects=1&contacts=1&dmsf_files=1&dmsf_folders=1&operations=1&attachments=0&options=0&commit=Submit" for 172.17.0.198 at 2016-08-31 14:42:19 +0800
Processing by SearchController#index as HTML
  Parameters: {"utf8"=>"✓", "q"=>"BUSINESS", "scope"=>"all", "all_words"=>"1", "titles_only"=>"", "issues"=>"1", "news"=>"1", "documents"=>"1", "changesets"=>"1", "wiki_pages"=>"1", "messages"=>"1", "projects"=>"1", "contacts"=>"1", "dmsf_files"=>"1", "dmsf_folders"=>"1", "operations"=>"1", "attachments"=>"0", "options"=>"0", "commit"=>"Submit"}
  SQL (2.9ms)  UPDATE "tokens" SET "updated_on" = '2016-08-31 14:42:19.128743' WHERE "tokens"."user_id" = $1 AND "tokens"."value" = $2 AND "tokens"."action" = $3  [["user_id", 7], ["value", "39ffd10e6af0ec67c3baba5b3a464f8a41f31e4c"], ["action", "session"]]
   (1.0ms)  SELECT MAX("settings"."updated_on") FROM "settings"
  User Load (0.8ms)  SELECT  "users".* FROM "users" WHERE "users"."type" IN ('User', 'AnonymousUser') AND "users"."status" = $1 AND "users"."id" = $2 LIMIT 1  [["status", 1], ["id", 7]]
  Current user: shemgp (id=7)
   (0.7ms)  SELECT MAX("contacts_settings"."updated_on") FROM "contacts_settings"
   (2.0ms)  SELECT DISTINCT "issues"."created_on", "issues"."id" FROM "issues" INNER JOIN "projects" ON "projects"."id" = "issues"."project_id" WHERE (projects.status <> 9 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='issue_tracking')) AND (((subject ILIKE '%BUSINESS%') OR (issues.description ILIKE '%BUSINESS%')))  ORDER BY "issues"."created_on" DESC, "issues"."id" DESC
  CustomField Load (0.6ms)  SELECT "custom_fields".* FROM "custom_fields" WHERE "custom_fields"."type" = $1 AND "custom_fields"."searchable" = $2  [["type", "IssueCustomField"], ["searchable", "t"]]
   (2.7ms)  SELECT DISTINCT "issues"."created_on", "issues"."id" FROM "issues" INNER JOIN "projects" ON "projects"."id" = "issues"."project_id" INNER JOIN "journals" ON "journals"."journalized_id" = "issues"."id" AND "journals"."journalized_type" = $1 WHERE (projects.status <> 9 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='issue_tracking')) AND (journals.private_notes = 'f' OR (projects.status <> 9 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='issue_tracking'))) AND (((journals.notes ILIKE '%BUSINESS%')))  ORDER BY "issues"."created_on" DESC, "issues"."id" DESC  [["journalized_type", "Issue"]]
   (1.9ms)  SELECT DISTINCT "news"."created_on", "news"."id" FROM "news" INNER JOIN "projects" ON "projects"."id" = "news"."project_id" WHERE (projects.status <> 9 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='news')) AND (((title ILIKE '%BUSINESS%') OR (summary ILIKE '%BUSINESS%') OR (news.description ILIKE '%BUSINESS%')))  ORDER BY "news"."created_on" DESC, "news"."id" DESC
   (1.8ms)  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 ILIKE '%BUSINESS%') OR (documents.description ILIKE '%BUSINESS%')))  ORDER BY "documents"."created_on" DESC, "documents"."id" DESC
  CustomField Load (0.7ms)  SELECT "custom_fields".* FROM "custom_fields" WHERE "custom_fields"."type" = $1 AND "custom_fields"."searchable" = $2  [["type", "DocumentCustomField"], ["searchable", "t"]]
   (3.9ms)  SELECT DISTINCT "changesets"."committed_on", "changesets"."id" FROM "changesets" INNER JOIN "repositories" ON "repositories"."id" = "changesets"."repository_id" INNER JOIN "projects" ON "projects"."id" = "repositories"."project_id" WHERE (projects.status <> 9 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='repository')) AND (((comments ILIKE '%BUSINESS%')))  ORDER BY "changesets"."committed_on" DESC, "changesets"."id" DESC
   (3.6ms)  SELECT DISTINCT "wiki_pages"."created_on", "wiki_pages"."id" FROM "wiki_pages" INNER JOIN "wiki_contents" ON "wiki_contents"."page_id" = "wiki_pages"."id" INNER JOIN "wikis" ON "wikis"."id" = "wiki_pages"."wiki_id" INNER JOIN "projects" ON "projects"."id" = "wikis"."project_id" WHERE (projects.status <> 9 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='wiki')) AND (((title ILIKE '%BUSINESS%') OR (wiki_contents.text ILIKE '%BUSINESS%')))  ORDER BY "wiki_pages"."created_on" DESC, "wiki_pages"."id" DESC
   (2.2ms)  SELECT DISTINCT "messages"."created_on", "messages"."id" FROM "messages" INNER JOIN "boards" ON "boards"."id" = "messages"."board_id" INNER JOIN "projects" ON "projects"."id" = "boards"."project_id" WHERE (projects.status <> 9 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='boards')) AND (((subject ILIKE '%BUSINESS%') OR (content ILIKE '%BUSINESS%')))  ORDER BY "messages"."created_on" DESC, "messages"."id" DESC
   (1.2ms)  SELECT DISTINCT "projects"."created_on", "projects"."id" FROM "projects" WHERE (projects.status <> 9) AND (((name ILIKE '%BUSINESS%') OR (identifier ILIKE '%BUSINESS%') OR (description ILIKE '%BUSINESS%')))  ORDER BY "projects"."created_on" DESC, "projects"."id" DESC
  CustomField Load (0.7ms)  SELECT "custom_fields".* FROM "custom_fields" WHERE "custom_fields"."type" = $1 AND "custom_fields"."searchable" = $2  [["type", "ProjectCustomField"], ["searchable", "t"]]
  User Load (1.1ms)  SELECT  "users".* FROM "users" WHERE "users"."type" IN ('User', 'AnonymousUser') AND "users"."id" = $1 LIMIT 1  [["id", 7]]
  Group Load (3.6ms)  SELECT "users".* FROM "users" INNER JOIN "groups_users" ON "users"."id" = "groups_users"."group_id" WHERE "users"."type" IN ('Group', 'GroupBuiltin', 'GroupAnonymous', 'GroupNonMember') AND "groups_users"."user_id" = $1  [["user_id", 7]]
   (1.4ms)  SELECT "projects"."id" FROM "projects" WHERE (projects.status = 1 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='contacts'))
  CACHE (0.0ms)  SELECT "projects"."id" FROM "projects" WHERE (projects.status = 1 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='contacts'))
   (2.9ms)  SELECT DISTINCT "contacts"."created_on", "contacts"."id" FROM "contacts" LEFT OUTER JOIN "contacts_projects" ON "contacts_projects"."contact_id" = "contacts"."id" LEFT OUTER JOIN "projects" ON "projects"."id" = "contacts_projects"."project_id" LEFT OUTER JOIN "addresses" ON "addresses"."addressable_id" = "contacts"."id" AND "addresses"."address_type" = $1 AND "addresses"."addressable_type" = $2 LEFT OUTER JOIN "notes" ON "notes"."source_id" = "contacts"."id" AND "notes"."source_type" = $3 WHERE ((projects.id <> -1 ) AND ((contacts.visibility = 1) OR (projects.id IN (1,5)) )) AND (((contacts.first_name ILIKE '%BUSINESS%') OR (contacts.middle_name ILIKE '%BUSINESS%') OR (contacts.last_name ILIKE '%BUSINESS%') OR (contacts.company ILIKE '%BUSINESS%') OR (contacts.email ILIKE '%BUSINESS%') OR (addresses.full_address ILIKE '%BUSINESS%') OR (contacts.background ILIKE '%BUSINESS%') OR (notes.content ILIKE '%BUSINESS%')))  ORDER BY "contacts"."created_on" DESC, "contacts"."id" DESC  [["address_type", "business"], ["addressable_type", "Contact"], ["source_type", "Contact"]]
  DmsfFile Load (2.6ms)  SELECT DISTINCT "dmsf_files".* FROM "dmsf_files" INNER JOIN "projects" ON "projects"."id" = "dmsf_files"."project_id" INNER JOIN "dmsf_file_revisions" ON "dmsf_file_revisions"."dmsf_file_id" = "dmsf_files"."id" WHERE "dmsf_files"."deleted" = $1 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 '%business%') OR (LOWER(dmsf_file_revisions.title) LIKE '%business%') OR (LOWER(dmsf_file_revisions.description) LIKE '%business%') OR (LOWER(dmsf_file_revisions.comment) LIKE '%business%')))  [["deleted", "f"]]
   (1.8ms)  SELECT DISTINCT "dmsf_folders"."updated_at", "dmsf_folders"."id" FROM "dmsf_folders" INNER JOIN "projects" ON "projects"."id" = "dmsf_folders"."project_id" WHERE (projects.status <> 9 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='dmsf')) AND (((dmsf_folders.title ILIKE '%BUSINESS%') OR (dmsf_folders.description ILIKE '%BUSINESS%')))  ORDER BY "dmsf_folders"."updated_at" DESC, "dmsf_folders"."id" DESC
  CustomField Load (0.6ms)  SELECT "custom_fields".* FROM "custom_fields" WHERE "custom_fields"."type" = $1 AND "custom_fields"."searchable" = $2  [["type", "DmsfFolderCustomField"], ["searchable", "t"]]
   (1.9ms)  SELECT DISTINCT "operations"."operation_date", "operations"."id" FROM "operations" INNER JOIN "accounts" ON "accounts"."id" = "operations"."account_id" INNER JOIN "projects" ON "projects"."id" = "accounts"."project_id" WHERE (projects.status = 1 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='finance')) AND (((operations.description ILIKE '%BUSINESS%')))  ORDER BY "operations"."operation_date" DESC, "operations"."id" DESC
  Member Exists (1.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  [["user_id", 7]]
  Rendered search/index.html.erb within layouts/base (15.4ms)
  UserPreference Load (0.7ms)  SELECT  "user_preferences".* FROM "user_preferences" WHERE "user_preferences"."user_id" = $1 LIMIT 1  [["user_id", 7]]
  Rendered plugins/redmine_code_review/app/views/code_review/_html_header.html.erb (0.1ms)
  Rendered plugins/redmine_create_wiki_page/app/views/create_wiki_page/_init_create_wiki_page.erb (0.1ms)
  Rendered inline template (1.6ms)
redmine_highlightjs2: supported browser: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:48.0) Gecko/20100101 Firefox/48.0
  Rendered plugins/redmine_pretend/app/views/user/_unpretend.html.erb (0.1ms)
  Attachment Load (0.8ms)  SELECT  "attachments".* FROM "attachments" WHERE "attachments"."container_id" = $1 AND "attachments"."container_type" = $2 AND (attachments.description = 'avatar') LIMIT 1  [["container_id", 7], ["container_type", "Principal"]]
  Attachment Load (0.7ms)  SELECT  "attachments".* FROM "attachments" WHERE "attachments"."container_id" = $1 AND "attachments"."container_type" = $2 AND "attachments"."description" = $3  ORDER BY attachments.created_on LIMIT 1  [["container_id", 7], ["container_type", "Principal"], ["description", "avatar"]]
  EmailAddress Load (0.6ms)  SELECT  "email_addresses".* FROM "email_addresses" WHERE "email_addresses"."user_id" = $1 AND "email_addresses"."is_default" = $2 LIMIT 1  [["user_id", 7], ["is_default", "t"]]
  Project Load (0.9ms)  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" = $2  [["user_id", 7], ["status", 1]]
  Rendered plugins/redmine_code_review/app/views/code_review/_body_bottom.html.erb (0.1ms)
Completed 200 OK in 210ms (Views: 83.3ms | ActiveRecord: 47.5ms)
Started GET "/redmine/search?utf8=%E2%9C%93&q=Philippines" for 172.17.0.198 at 2016-08-31 14:42:27 +0800
Processing by SearchController#index as HTML
  Parameters: {"utf8"=>"✓", "q"=>"Philippines"}
  SQL (304.7ms)  UPDATE "tokens" SET "updated_on" = '2016-08-31 14:42:27.799283' WHERE "tokens"."user_id" = $1 AND "tokens"."value" = $2 AND "tokens"."action" = $3  [["user_id", 7], ["value", "39ffd10e6af0ec67c3baba5b3a464f8a41f31e4c"], ["action", "session"]]
   (1.2ms)  SELECT MAX("settings"."updated_on") FROM "settings"
  User Load (0.8ms)  SELECT  "users".* FROM "users" WHERE "users"."type" IN ('User', 'AnonymousUser') AND "users"."status" = $1 AND "users"."id" = $2 LIMIT 1  [["status", 1], ["id", 7]]
  Current user: shemgp (id=7)
   (0.9ms)  SELECT MAX("contacts_settings"."updated_on") FROM "contacts_settings"
   (2.0ms)  SELECT DISTINCT "issues"."created_on", "issues"."id" FROM "issues" INNER JOIN "projects" ON "projects"."id" = "issues"."project_id" WHERE (projects.status <> 9 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='issue_tracking')) AND (((subject ILIKE '%Philippines%') OR (issues.description ILIKE '%Philippines%')))  ORDER BY "issues"."created_on" DESC, "issues"."id" DESC
  CustomField Load (0.6ms)  SELECT "custom_fields".* FROM "custom_fields" WHERE "custom_fields"."type" = $1 AND "custom_fields"."searchable" = $2  [["type", "IssueCustomField"], ["searchable", "t"]]
   (2.8ms)  SELECT DISTINCT "issues"."created_on", "issues"."id" FROM "issues" INNER JOIN "projects" ON "projects"."id" = "issues"."project_id" INNER JOIN "journals" ON "journals"."journalized_id" = "issues"."id" AND "journals"."journalized_type" = $1 WHERE (projects.status <> 9 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='issue_tracking')) AND (journals.private_notes = 'f' OR (projects.status <> 9 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='issue_tracking'))) AND (((journals.notes ILIKE '%Philippines%')))  ORDER BY "issues"."created_on" DESC, "issues"."id" DESC  [["journalized_type", "Issue"]]
   (2.0ms)  SELECT DISTINCT "news"."created_on", "news"."id" FROM "news" INNER JOIN "projects" ON "projects"."id" = "news"."project_id" WHERE (projects.status <> 9 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='news')) AND (((title ILIKE '%Philippines%') OR (summary ILIKE '%Philippines%') OR (news.description ILIKE '%Philippines%')))  ORDER BY "news"."created_on" DESC, "news"."id" DESC
   (1.8ms)  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 ILIKE '%Philippines%') OR (documents.description ILIKE '%Philippines%')))  ORDER BY "documents"."created_on" DESC, "documents"."id" DESC
  CustomField Load (0.7ms)  SELECT "custom_fields".* FROM "custom_fields" WHERE "custom_fields"."type" = $1 AND "custom_fields"."searchable" = $2  [["type", "DocumentCustomField"], ["searchable", "t"]]
   (4.0ms)  SELECT DISTINCT "changesets"."committed_on", "changesets"."id" FROM "changesets" INNER JOIN "repositories" ON "repositories"."id" = "changesets"."repository_id" INNER JOIN "projects" ON "projects"."id" = "repositories"."project_id" WHERE (projects.status <> 9 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='repository')) AND (((comments ILIKE '%Philippines%')))  ORDER BY "changesets"."committed_on" DESC, "changesets"."id" DESC
   (4.1ms)  SELECT DISTINCT "wiki_pages"."created_on", "wiki_pages"."id" FROM "wiki_pages" INNER JOIN "wiki_contents" ON "wiki_contents"."page_id" = "wiki_pages"."id" INNER JOIN "wikis" ON "wikis"."id" = "wiki_pages"."wiki_id" INNER JOIN "projects" ON "projects"."id" = "wikis"."project_id" WHERE (projects.status <> 9 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='wiki')) AND (((title ILIKE '%Philippines%') OR (wiki_contents.text ILIKE '%Philippines%')))  ORDER BY "wiki_pages"."created_on" DESC, "wiki_pages"."id" DESC
   (2.3ms)  SELECT DISTINCT "messages"."created_on", "messages"."id" FROM "messages" INNER JOIN "boards" ON "boards"."id" = "messages"."board_id" INNER JOIN "projects" ON "projects"."id" = "boards"."project_id" WHERE (projects.status <> 9 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='boards')) AND (((subject ILIKE '%Philippines%') OR (content ILIKE '%Philippines%')))  ORDER BY "messages"."created_on" DESC, "messages"."id" DESC
   (1.0ms)  SELECT DISTINCT "projects"."created_on", "projects"."id" FROM "projects" WHERE (projects.status <> 9) AND (((name ILIKE '%Philippines%') OR (identifier ILIKE '%Philippines%') OR (description ILIKE '%Philippines%')))  ORDER BY "projects"."created_on" DESC, "projects"."id" DESC
  CustomField Load (0.7ms)  SELECT "custom_fields".* FROM "custom_fields" WHERE "custom_fields"."type" = $1 AND "custom_fields"."searchable" = $2  [["type", "ProjectCustomField"], ["searchable", "t"]]
  User Load (0.7ms)  SELECT  "users".* FROM "users" WHERE "users"."type" IN ('User', 'AnonymousUser') AND "users"."id" = $1 LIMIT 1  [["id", 7]]
  Group Load (4.1ms)  SELECT "users".* FROM "users" INNER JOIN "groups_users" ON "users"."id" = "groups_users"."group_id" WHERE "users"."type" IN ('Group', 'GroupBuiltin', 'GroupAnonymous', 'GroupNonMember') AND "groups_users"."user_id" = $1  [["user_id", 7]]
   (1.5ms)  SELECT "projects"."id" FROM "projects" WHERE (projects.status = 1 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='contacts'))
  CACHE (0.0ms)  SELECT "projects"."id" FROM "projects" WHERE (projects.status = 1 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='contacts'))
   (2.8ms)  SELECT DISTINCT "contacts"."created_on", "contacts"."id" FROM "contacts" LEFT OUTER JOIN "contacts_projects" ON "contacts_projects"."contact_id" = "contacts"."id" LEFT OUTER JOIN "projects" ON "projects"."id" = "contacts_projects"."project_id" LEFT OUTER JOIN "addresses" ON "addresses"."addressable_id" = "contacts"."id" AND "addresses"."address_type" = $1 AND "addresses"."addressable_type" = $2 LEFT OUTER JOIN "notes" ON "notes"."source_id" = "contacts"."id" AND "notes"."source_type" = $3 WHERE ((projects.id <> -1 ) AND ((contacts.visibility = 1) OR (projects.id IN (1,5)) )) AND (((contacts.first_name ILIKE '%Philippines%') OR (contacts.middle_name ILIKE '%Philippines%') OR (contacts.last_name ILIKE '%Philippines%') OR (contacts.company ILIKE '%Philippines%') OR (contacts.email ILIKE '%Philippines%') OR (addresses.full_address ILIKE '%Philippines%') OR (contacts.background ILIKE '%Philippines%') OR (notes.content ILIKE '%Philippines%')))  ORDER BY "contacts"."created_on" DESC, "contacts"."id" DESC  [["address_type", "business"], ["addressable_type", "Contact"], ["source_type", "Contact"]]
  DmsfFile Load (2.6ms)  SELECT DISTINCT "dmsf_files".* FROM "dmsf_files" INNER JOIN "projects" ON "projects"."id" = "dmsf_files"."project_id" INNER JOIN "dmsf_file_revisions" ON "dmsf_file_revisions"."dmsf_file_id" = "dmsf_files"."id" WHERE "dmsf_files"."deleted" = $1 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 '%philippines%') OR (LOWER(dmsf_file_revisions.title) LIKE '%philippines%') OR (LOWER(dmsf_file_revisions.description) LIKE '%philippines%') OR (LOWER(dmsf_file_revisions.comment) LIKE '%philippines%')))  [["deleted", "f"]]
   (1.8ms)  SELECT DISTINCT "dmsf_folders"."updated_at", "dmsf_folders"."id" FROM "dmsf_folders" INNER JOIN "projects" ON "projects"."id" = "dmsf_folders"."project_id" WHERE (projects.status <> 9 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='dmsf')) AND (((dmsf_folders.title ILIKE '%Philippines%') OR (dmsf_folders.description ILIKE '%Philippines%')))  ORDER BY "dmsf_folders"."updated_at" DESC, "dmsf_folders"."id" DESC
  CustomField Load (0.6ms)  SELECT "custom_fields".* FROM "custom_fields" WHERE "custom_fields"."type" = $1 AND "custom_fields"."searchable" = $2  [["type", "DmsfFolderCustomField"], ["searchable", "t"]]
   (1.8ms)  SELECT DISTINCT "operations"."operation_date", "operations"."id" FROM "operations" INNER JOIN "accounts" ON "accounts"."id" = "operations"."account_id" INNER JOIN "projects" ON "projects"."id" = "accounts"."project_id" WHERE (projects.status = 1 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='finance')) AND (((operations.description ILIKE '%Philippines%')))  ORDER BY "operations"."operation_date" DESC, "operations"."id" DESC
  Member Exists (1.1ms)  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  [["user_id", 7]]
  Rendered search/index.html.erb within layouts/base (12.0ms)
  UserPreference Load (1.1ms)  SELECT  "user_preferences".* FROM "user_preferences" WHERE "user_preferences"."user_id" = $1 LIMIT 1  [["user_id", 7]]
  Rendered plugins/redmine_code_review/app/views/code_review/_html_header.html.erb (0.1ms)
  Rendered plugins/redmine_create_wiki_page/app/views/create_wiki_page/_init_create_wiki_page.erb (0.1ms)
  Rendered inline template (1.2ms)
redmine_highlightjs2: supported browser: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:48.0) Gecko/20100101 Firefox/48.0
  Rendered plugins/redmine_pretend/app/views/user/_unpretend.html.erb (0.1ms)
  Attachment Load (0.7ms)  SELECT  "attachments".* FROM "attachments" WHERE "attachments"."container_id" = $1 AND "attachments"."container_type" = $2 AND (attachments.description = 'avatar') LIMIT 1  [["container_id", 7], ["container_type", "Principal"]]
  Attachment Load (0.8ms)  SELECT  "attachments".* FROM "attachments" WHERE "attachments"."container_id" = $1 AND "attachments"."container_type" = $2 AND "attachments"."description" = $3  ORDER BY attachments.created_on LIMIT 1  [["container_id", 7], ["container_type", "Principal"], ["description", "avatar"]]
  EmailAddress Load (0.6ms)  SELECT  "email_addresses".* FROM "email_addresses" WHERE "email_addresses"."user_id" = $1 AND "email_addresses"."is_default" = $2 LIMIT 1  [["user_id", 7], ["is_default", "t"]]
  Project Load (1.0ms)  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" = $2  [["user_id", 7], ["status", 1]]
  Rendered plugins/redmine_code_review/app/views/code_review/_body_bottom.html.erb (0.1ms)
Completed 200 OK in 512ms (Views: 59.1ms | ActiveRecord: 350.9ms)
lugins/redmine_code_review/app/views/code_review/_body_bottom.html.erb (0.1ms)
Completed 200 OK in 512ms (Views: 59.1ms | ActiveRecord: 350.9ms)

Screenshots: screenshot from 2016-08-30 10-51-33 screenshot from 2016-08-31 14-39-51 screenshot from 2016-08-31 14-39-13

Thanks for your help.

picman commented 8 years ago

I'm not able to reproduce your problem. It finds all three words on my computer.

shemgp commented 8 years ago

After some hours of looking at the code. I figured out that the Xapian::QueryParser::STEM_ALL was causing it to not find any indexed files so I just used STEM_SOME in the settings and it worked. By the way, I'm using 1.5.6 as Debian's Redmine is not yet using 3.3.0.