weekly release 3.5dev
[moodle.git] / search / upgrade.txt
1This files describes API changes in /search/*,
2information provided here is intended especially for developers.
25564a78 4=== 3.5 ===
6* Search areas may now optionally implement the get_contexts_to_reindex function (for modules and
7 blocks, see also get_contexts_to_reindex_extra_sql). This allows a search area to customise the
8 order in which it is reindexed when doing a gradual reindex, so as to reindex the most important
65da6840 9 contexts first. If not implemented, the default behaviour for modules and blocks is to reindex
10 the newest items first; for other types of search area it will just index the whole system
11 context, oldest data first.
25564a78 12
67d64795 13=== 3.4 ===
15* Search indexing now supports time limits to make the scheduled task run more neatly. In order for
16 this to work, search engine plugins will need to implement the 'stopat' parameter if they
17 override the add_documents() function, and return an extra parameter from this function (see base
18 class in engine.php). Unmodified plugins will still work, but without supporting time limits.
427b7563 19* Search areas should now implement the get_document_recordset function instead of the old
20 get_recordset_by_timestamp API (implement both if the area should work in older Moodle versions
21 as well). The new function is the same as the old one, but has an additional context parameter.
22 There is a helper function get_context_restriction_sql to make this easy to implement; see code
23 in base_activity.php for an example of how to implement this in your search area. (The
24 change was required to make search work after restoring sites. It also allows more flexible
25 reindexing in other cases.)
67d64795 26
27=== 3.2 ===
29* Base search area classes have been renamed, please update your search areas to use the classes below:
30 - \core_search\area\base has been renamed to \core_search\base
31 - \core_search\area\base_mod has been renamed to \core_search\base_mod
32 - \core_search\area\base_activity has been renamed to \core_search\base_activity