mirror of
https://github.com/flarum/core.git
synced 2025-07-14 05:16:24 +02:00
Improve search performance (#1339)
* Improve fulltext gambit * Only search in visible posts This change relies on the `visibility-scoping` branch to be merged. * Change posts table to use InnoDB engine Doing a JOIN between an InnoDB table (discussions) and a MyISAM table (posts) is very very (very) bad for performance. FULLTEXT indexes are fully supported in InnoDB now, and it is a superior engine in every other way, so there is no longer any reason to be using MyISAM. * Use ::class * Only search for comment posts * Add fulltext index to discussions.title * Fix migration not working if there is a table prefix * Update frontend appearance * Apply fixes from StyleCI [ci skip] [skip ci] * Show search result excerpts on mobile
This commit is contained in:
@ -21,7 +21,7 @@ Object.assign(Discussion.prototype, {
|
||||
commentsCount: Model.attribute('commentsCount'),
|
||||
repliesCount: computed('commentsCount', commentsCount => Math.max(0, commentsCount - 1)),
|
||||
posts: Model.hasMany('posts'),
|
||||
relevantPosts: Model.hasMany('relevantPosts'),
|
||||
mostRelevantPost: Model.hasOne('mostRelevantPost'),
|
||||
|
||||
readTime: Model.attribute('readTime', Model.transformDate),
|
||||
readNumber: Model.attribute('readNumber'),
|
||||
|
Reference in New Issue
Block a user