Osticket搜索不起作用数据库错误1191

时间:2018-11-14 12:57:02

标签: mysql osticket

当有人尝试以管理员身份搜索故障单时,我收到一封包含此错误的电子邮件。 OsTicket v1.11.0-rc1(e321982)

[SELECT SQL_CALC_FOUND_ROWS A1.`number` AS `number`, A1.`ticket_id` AS `ticket_id`, A1.`source` AS `source`, A1.`created` AS `created`, A8.`subject` AS `cdata__subject`, A1.`isoverdue` AS `isoverdue`, B0.`name` AS `user__name`, A8.`priority` AS `cdata__priority`, B1.`firstname` AS `staff__firstname`, B1.`lastname` AS `staff__lastname`, B2.`name` AS `team__name`, A1.`team_id` AS `team_id`, A1.`isanswered` = '1' AS `8MwwjGf`, (SELECT COUNT(R0.`id`) AS `count` FROM `ost_thread` Q7 JOIN `ost_ticket` Q8 ON (Q7.`object_type` = 'T' AND Q7.`object_id` = Q8.`ticket_id`) LEFT JOIN `ost_thread_entry` R0 ON (Q7.`id` = R0.`thread_id`) WHERE Q8.`ticket_id` = A1.`ticket_id` AND NOT R0.`flags` & 4 != 0) AS _thread_count, (SELECT COUNT(R1.`id`) AS `count` FROM `ost_thread` Q7 JOIN `ost_ticket` Q8 ON (Q7.`object_type` = 'T' AND Q7.`object_id` = Q8.`ticket_id`) LEFT JOIN `ost_thread_entry` R0 ON (Q7.`id` = R0.`thread_id`) LEFT JOIN `ost_attachment` R1 ON (R1.`type` = 'H' AND R0.`id` = R1.`object_id`) WHERE Q8.`ticket_id` = A1.`ticket_id` AND R1.`inline` = 0) AS _att_count, COALESCE(B1.`firstname`, B1.`lastname`, B2.`name`, 'zzz') AS `assignee` FROM `ost_ticket` A1 JOIN `ost_ticket_status` A2 ON (A1.`status_id` = A2.`id`) LEFT JOIN `ost_thread` A3 ON (A3.`object_type` = 'T' AND A1.`ticket_id` = A3.`object_id`) LEFT JOIN `ost_thread_referral` A4 ON (A3.`id` = A4.`thread_id`) LEFT JOIN `ost_staff` A5 ON (A4.`object_type` = 'S' AND A4.`object_id` = A5.`staff_id`) LEFT JOIN `ost_team` A6 ON (A4.`object_type` = 'E' AND A4.`object_id` = A6.`team_id`) LEFT JOIN `ost_department` A7 ON (A4.`object_type` = 'D' AND A4.`object_id` = A7.`id`) LEFT JOIN `ost_ticket__cdata` A8 ON (A1.`ticket_id` = A8.`ticket_id`) JOIN `ost_user` B0 ON (A1.`user_id` = B0.`id`) LEFT JOIN `ost_staff` B1 ON (A1.`staff_id` = B1.`staff_id`) LEFT JOIN `ost_team` B2 ON (A1.`team_id` = B2.`team_id`) JOIN (SELECT COALESCE(Z3.`object_id`, Z5.`ticket_id`, Z8.`ticket_id`) as `ticket_id`, SUM(MATCH (Z1.title, Z1.content) AGAINST ('black8' IN NATURAL LANGUAGE MODE)) AS `relevance` FROM `ost__search` Z1 LEFT JOIN `ost_thread_entry` Z2 ON (Z1.`object_type` = 'H' AND Z1.`object_id` = Z2.`id`) LEFT JOIN `ost_thread` Z3 ON (Z2.`thread_id` = Z3.`id` AND Z3.`object_type` = 'T') LEFT JOIN `ost_ticket` Z5 ON (Z1.`object_type` = 'T' AND Z1.`object_id` = Z5.`ticket_id`) LEFT JOIN `ost_user` Z6 ON (Z6.`id` = Z1.`object_id` and Z1.`object_type` = 'U') LEFT JOIN `ost_organization` Z7 ON (Z7.`id` = Z1.`object_id` AND Z7.`id` = Z6.`org_id` AND Z1.`object_type` = 'O') LEFT JOIN ost_ticket Z8 ON (Z8.`user_id` = Z6.`id`) WHERE MATCH (Z1.title, Z1.content) AGAINST ('black8' IN NATURAL LANGUAGE MODE) GROUP BY `ticket_id`) Z1 WHERE A1.`ticket_id` = Z1.`ticket_id` AND ((A2.`state` = 'open' AND (A1.`staff_id` = 7 OR A5.`staff_id` = 7 OR A1.`team_id` IN (5) OR A6.`team_id` IN (5))) OR A1.`dept_id` IN (1, 4, 5) OR A7.`id` IN (1, 4, 5)) GROUP BY A1.`number`, A1.`ticket_id`, A1.`source`, A1.`created`, A8.`subject`, A1.`isoverdue`, B0.`name`, A8.`priority`, B1.`firstname`, B1.`lastname`, B2.`name`, A1.`team_id` LIMIT 25]
  

找不到与列列表匹配的FULLTEXT索引

  ----回溯----
  0(根)/include/mysqli.php(199):osTicket-> logDBError('DB错误#1191','[SELECT SQL_CAL ...')
  1(root)/include/class.orm.php(3404):db_query('SELECT SQL_CALC ...',true,true)
  2(root)/include/class.orm.php(3451):MySqlExecutor-> execute()
  3(root)/include/class.orm.php(2063):MySqlExecutor-> getArray()
  4(root)/include/class.orm.php(2013):HashArrayIterator-> {closure}()
  5(root)/include/class.orm.php(1992):CallbackSimpleIterator-> next()
  6(root)/include/class.orm.php(2001):CallbackSimpleIterator-> rewind()
  7(root)/include/class.orm.php(1673):CallbackSimpleIterator-> valid()
  8(root)/include/class.orm.php(1708):CachedResultSet-> fillTo(1)
  9(root)/include/class.orm.php(1569):CachedResultSet-> offsetGet(0)
  10(root)/include/class.orm.php(1437):QuerySet-> offsetGet(0)
  11(root)/include/class.orm.php(1394):QuerySet-> exists(true)
  12(root)/include/staff/templates/queue-tickets.tmpl.php(79):QuerySet-> total()
  13(root)/scp/tickets.php(543):require_once('/ var / www / html / u ...')
  14 {main}

1 个答案:

答案 0 :(得分:0)

我跑了

ALTER TABLE `ost__search` ADD FULLTEXT(title,content);

这解决了问题。