#3288 - Major overhaul of fulltext search support, the "Composr fast custom index"

Identifier #3288
Issue type Feature request or suggestion
Title Major overhaul of fulltext search support, the "Composr fast custom index"
Status Completed
Tags

ocProducts client-work (likely) (custom)

Type: Performance (custom)

Handling member Chris Graham
Addon core_database_drivers
Description We can implement support for fulltext search on all database drivers, regardless of whether the database backends support it.

This is doable via an 'inverted index'. Essentially we just do our own word tokenisation and store it in our own table.

An advantage to this is we can then do much more sophisticated metrics to stop slow searches. We could have fields in our inverted index table for all search qualifiers (post time, author, etc), so that we know we can easily only ever be looking at a subset of the index. Currently the problem with MySQL fulltext search is that the index can not be done against search qualifiers, so you get this huge trawl through non-qualified results as it gets to the occasional qualified ones.

If we do this, I see no reason we can't just drop the regular fulltext search support we have. We can do better, so there's no need to do anything native to each database backend.
EDIT: It is actually useful for non-search-engine querying, e.g. in the find_filedump_links function as an optimisation, or in Filtercode. It should stay. We don't need to support it on all DB backends though as it's an optimisation only.

This depends on #3958 - we don't want to be populating the index when the server is under high load.
EDIT: Not really. It is an iterative process.
Steps to reproduce

Additional information Alternatively we can also implement more fulltext search support for individual databases.
DB2, Oracle, and Sqlite (with non-default extension), also support fulltext search but we don't implement it.
If we do this we will need to totally overhaul our fulltext search code too because our code currently assumes it works via indexes, which is not a universally valid assumption. Particularly when indexes are deleted, it doesn't even go into the database driver API for that.

I prefer to implement our own fulltext rather than make a complex multi-vendor API, with lots of testing. It'd be a better result for less investment.
Related to

#3958 - Opportunistic scheduler

Funded? No
The system will post a comment when this issue is modified (e.g., status changes). To be notified of this, click "Enable comment notifications".

Rating

Unrated