1
0
mirror of https://github.com/moodle/moodle.git synced 2025-03-27 19:12:39 +01:00
sam marshall 65da6840f8 MDL-60981 core_search: UI to gradually reindex a single area
Adds a new 'Gradual reindex' link to the search areas page for each
area. When clicked, this takes you to a confirm prompt, and then
adds each context from that search area to the indexing queue.

The search areas page now displays the 'Additional indexing queue'
(if it is non-empty). The table shows the first 10 items in the
queue, and it also indicates the total number in case there are
more. (I don't think people really need to see the entire
contents of it, so I didn't implement paging.)
2017-12-22 13:05:11 +00:00

33 lines
1.9 KiB
Plaintext

This files describes API changes in /search/*,
information provided here is intended especially for developers.
=== 3.5 ===
* Search areas may now optionally implement the get_contexts_to_reindex function (for modules and
blocks, see also get_contexts_to_reindex_extra_sql). This allows a search area to customise the
order in which it is reindexed when doing a gradual reindex, so as to reindex the most important
contexts first. If not implemented, the default behaviour for modules and blocks is to reindex
the newest items first; for other types of search area it will just index the whole system
context, oldest data first.
=== 3.4 ===
* Search indexing now supports time limits to make the scheduled task run more neatly. In order for
this to work, search engine plugins will need to implement the 'stopat' parameter if they
override the add_documents() function, and return an extra parameter from this function (see base
class in engine.php). Unmodified plugins will still work, but without supporting time limits.
* Search areas should now implement the get_document_recordset function instead of the old
get_recordset_by_timestamp API (implement both if the area should work in older Moodle versions
as well). The new function is the same as the old one, but has an additional context parameter.
There is a helper function get_context_restriction_sql to make this easy to implement; see code
in base_activity.php for an example of how to implement this in your search area. (The
change was required to make search work after restoring sites. It also allows more flexible
reindexing in other cases.)
=== 3.2 ===
* Base search area classes have been renamed, please update your search areas to use the classes below:
- \core_search\area\base has been renamed to \core_search\base
- \core_search\area\base_mod has been renamed to \core_search\base_mod
- \core_search\area\base_activity has been renamed to \core_search\base_activity