Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

[resolved] Keyword search in ticket subject or content still not working

Hi,

Keyword search in ticket subject or content not working.


I tried to search in tickets, by some words from subject or content, but this doesn't work.


I started with 1.9.5.1 version, next migrated to 1.9.6 - both versions have the same problem.


Below movie how I searched:

image

And information about my osTicket Installation:

image

I see that others also reported the same bug:

http://osticket.com/forum/discussion/80236/keyword-search-is-not-working - in this topic someone wrote temporary fix (to change line if (class_exists('IntlBreakIterator')==false) and next to truncate the ost__search table), but this fix doesn't work for me. Note also, that truncating the table ost__search, do not forced this table to re-populate.


Someone also wrote that 1.9.6 resolved this bug, but I can't confirm this. 
I'm now using 1.9.6 and as you can see on movie above this is still problem.
Maybe it's problem with my polski (Polish) Language Pack?

Comments

  • I'm having the same issue. Search does not return any result. 

    1.9.5 English 
  • Try changing to English and see what happens.

    Also there are a number of resolved search issue reports over at github.  You might want to take a look at them.

    @brenjen upgrade to 1.9.6, and if you are still having the issue please open your own thread.


  • My Preferences > Preferred Language > I changed from Polish to English

    Unfortunately it's the same effect - keyword search still not working, even with English.

    At github I can see only one related issue report:
    - and it doesn't look like resolved :/
  • Do I need to report this on github?
  • Ok., both on Polish and English I got this error delivered to email(before I do not checked this email account):

    [SELECT DISTINCT COALESCE(B1.ticket_id, B2.ticket_id, B3.ticket_id, B4.ticket_id) FROM (
                    SELECT object_type, object_id, MATCH (search.title, search.content) AGAINST ('super' IN BOOLEAN MODE) AS `relevance`
                    FROM `ost__search` `search`
                    WHERE MATCH (search.title, search.content) AGAINST ('super' IN BOOLEAN MODE)
                ) `search` LEFT JOIN (select ticket_id as ticket_id from ost_ticket
                ) B1 ON (B1.ticket_id = search.object_id and search.object_type = 'T') LEFT JOIN (select A2.id as thread_id, A1.ticket_id from ost_ticket A1
                    join ost_ticket_thread A2 on (A1.ticket_id = A2.ticket_id)
                ) B2 ON (B2.thread_id = search.object_id and search.object_type = 'H') LEFT JOIN (select A3.id as user_id, A1.ticket_id from ost_user A3
                    join ost_ticket A1 on (A1.user_id = A3.id)
                ) B3 ON (B3.user_id = search.object_id and search.object_type = 'U') LEFT JOIN (select A4.id as org_id, A1.ticket_id from ost_organization A4
                    join ost_user A3 on (A3.org_id = A4.id) join ost_ticket A1 on (A1.user_id = A3.id)
                ) B4 ON (B4.org_id = search.object_id and search.object_type = 'O') LEFT JOIN ost_ticket A1 ON (A1.ticket_id = COALESCE(B1.ticket_id, B2.ticket_id, B3.ticket_id, B4.ticket_id)) LEFT JOIN ost_ticket_status A2 ON (A1.status_id = A2.id) WHERE ((A1.staff_id=1 AND A2.state="open") OR A1.dept_id IN (1,2,3,4) OR A1.team_id IN (1) AND A2.state="open")ORDER BY `search`.`relevance` LIMIT 500]

    The used table type doesn't support FULLTEXT indexes<br /> <br />
    ---- Backtrace ----<br />
    #0 (root)/include/mysqli.php(177): osTicket->logDBError('DB Error #1214', '[SELECT DISTINC...')<br />
    #1 (root)/include/class.search.php(436): db_query('SELECT DISTINCT...', Object(Closure))<br />
    #2 (root)/include/class.search.php(66): MysqlSearchBackend->find('super', Array, 'Ticket', Array)<br />
    #3 (root)/include/ajax.tickets.php(242): SearchInterface->find('super', Array, 'Ticket')<br />
    #4 (root)/include/staff/tickets.inc.php(139): TicketsAjaxAPI::_search(Array)<br />
    #5 (root)/scp/tickets.php(492): require_once('/home/web/web-9...')<br />
    #6 {main}


  • So, problem is with our MySQL version, on hosting we have MySQL 5.1.73.
    Our hosting company said that they can only upgrade this to MySQL 5.5.

    InnoDB tables do not support FULLTEXT indexes before MySQL 5.6.
    Before MySQL 5.6 Full-Text Search is supported only with MyISAM Engine.

    Can we change engine for osticket tables to MyISAM? 
    Would it work properly with MyISAM?
  • Were running 1.9.5.1 and 1.9.6 (test environment) under MySQL 5.5.41 and search does not work.  It was prior to out 1.9.5.1 upgrade but I forgot if it was the prior version or the one prior to that.

    This sorta fixed the problem:
    https://github.com/osTicket/osTicket-1.8/issues/1532#issuecomment-72070665

    The issue is without the ability for us to search backwards and look for historical data, our team is re-inventing the wheel with each support ticket and not able to look at previous resolutions.


  • edited March 2015
    @1QuickSI: This is because you have MySQL version older than MySQL 5.6.

    By code below, in osTicket tables, I changed MySQL engine to MyISAM - with this search started to work.
    BE AWARE: I do not know if this is secure - someone from osTicket team need to confirm this, because there could be some other functionality that will stop working properly after this change.
  • edited March 2015
    ALTER TABLE ost_api_key ENGINE=MyISAM;
    ALTER TABLE ost_attachment ENGINE=MyISAM;
    ALTER TABLE ost_canned_response ENGINE=MyISAM;
    ALTER TABLE ost_config ENGINE=MyISAM;
    ALTER TABLE ost_content ENGINE=MyISAM;
    ALTER TABLE ost_department ENGINE=MyISAM;
    ALTER TABLE ost_draft ENGINE=MyISAM;
    ALTER TABLE ost_email ENGINE=MyISAM;
    ALTER TABLE ost_email_account ENGINE=MyISAM;
    ALTER TABLE ost_email_template ENGINE=MyISAM;
    ALTER TABLE ost_email_template_group ENGINE=MyISAM;
    ALTER TABLE ost_faq ENGINE=MyISAM;
    ALTER TABLE ost_faq_category ENGINE=MyISAM;
    ALTER TABLE ost_faq_topic ENGINE=MyISAM;
    ALTER TABLE ost_file ENGINE=MyISAM;
    ALTER TABLE ost_file_chunk ENGINE=MyISAM;
    ALTER TABLE ost_filter ENGINE=MyISAM;
    ALTER TABLE ost_filter_rule ENGINE=MyISAM;
    ALTER TABLE ost_form ENGINE=MyISAM;
    ALTER TABLE ost_form_entry ENGINE=MyISAM;
    ALTER TABLE ost_form_entry_values ENGINE=MyISAM;
    ALTER TABLE ost_form_field ENGINE=MyISAM;
    ALTER TABLE ost_groups ENGINE=MyISAM;
    ALTER TABLE ost_group_dept_access ENGINE=MyISAM;
    ALTER TABLE ost_help_topic ENGINE=MyISAM;
    ALTER TABLE ost_list ENGINE=MyISAM;
    ALTER TABLE ost_list_items ENGINE=MyISAM;
    ALTER TABLE ost_note ENGINE=MyISAM;
    ALTER TABLE ost_organization ENGINE=MyISAM;
    ALTER TABLE ost_plugin ENGINE=MyISAM;
    ALTER TABLE ost_sequence ENGINE=MyISAM;
    ALTER TABLE ost_session ENGINE=MyISAM;
    ALTER TABLE ost_sla ENGINE=MyISAM;
    ALTER TABLE ost_staff ENGINE=MyISAM;
    ALTER TABLE ost_syslog ENGINE=MyISAM;
    ALTER TABLE ost_team ENGINE=MyISAM;
    ALTER TABLE ost_team_member ENGINE=MyISAM;
    ALTER TABLE ost_ticket ENGINE=MyISAM;
    ALTER TABLE ost_ticket_attachment ENGINE=MyISAM;
    ALTER TABLE ost_ticket_collaborator ENGINE=MyISAM;
    ALTER TABLE ost_ticket_email_info ENGINE=MyISAM;
    ALTER TABLE ost_ticket_event ENGINE=MyISAM;
    ALTER TABLE ost_ticket_lock ENGINE=MyISAM;
    ALTER TABLE ost_ticket_priority ENGINE=MyISAM;
    ALTER TABLE ost_ticket_status ENGINE=MyISAM;
    ALTER TABLE ost_ticket_thread ENGINE=MyISAM;
    ALTER TABLE ost_timezone ENGINE=MyISAM;
    ALTER TABLE ost_user ENGINE=MyISAM;
    ALTER TABLE ost_user_account ENGINE=MyISAM;
    ALTER TABLE ost_user_email ENGINE=MyISAM;
    ALTER TABLE ost__search ENGINE=MyISAM;
  • I have had exactly the same problem since 1.9.4 - was perfect before then.
    http://www.osticket.com/forum/discussion/81043/keyword-search-not-working
    I was led to believe i was the only one with that problem
  • @infotec
    believe it's because change in osticket search engine "< v1.9.4 used MySQL LIKE scanning, >= v1.9.4 uses MySQL full text search":

    I only don't understand two things:
    1. osticket team members here at forum shouldn't know about this change? Why are they surprised?
    2. Why at http://osticket.com/download page in System Requirements section is still required MySQL Database: 5.0+ ? Now with this change, and with InnoDB engine as default, there should be rather MySQL Database: 5.6+ 
    It looks a bit like problem with communication and information flow within a osticket team...
    In spite of all, maybe github project page, is better place to report issues?
  • I personally was not aware of the solution of that issue with the search, so let me say thanks for pointing out the solution, so that's why I was surprised.

    I'll point the developers to this thread and then it's up to them to either change the system requirements at the homepage or react in another appropriate way to make sure that not more users are driven mad by the not working search.

    Cheers,
    Michael
  • I did the "ALTER TABLE.... changes listed above by Aka4 but my searches are still not fully working (MySQL Version    5.6.23)
  • @infotec: So, your case is different, you have mysql 5.6, could you continue in your thread?
  • @Chefkeks anything new from devs?
  • You would want to look at the github thread for updates from the devs.
  • @greezybacon made patch for few bugs in search (for me it worked): https://github.com/osTicket/osTicket-1.8/pull/2111

  • edited June 2015
    Great!
    I'll close this thread and mark it as resolved.
This discussion has been closed.