MDL-60981 core_search: Add get_contexts_to_reindex API
authorsam marshall <s.marshall@open.ac.uk>
Thu, 7 Dec 2017 12:26:55 +0000 (12:26 +0000)
committersam marshall <s.marshall@open.ac.uk>
Fri, 22 Dec 2017 13:02:37 +0000 (13:02 +0000)
commit25564a784b9da372ad1147d638ff5d0990e53286
treeacf783b95e0492a63e4a5a64b8ef9304ec97bcaa
parent9993c1d02c32760f7df036b5d92bc2f75fd98b06
MDL-60981 core_search: Add get_contexts_to_reindex API

This new API returns a list of contexts for each search area. This
allows the areas to be reindexed in a sensible order (roughly
speaking, newest first) and also allows this to be controlled by
each area.

An implementation in the forum module means that forums are ordered
by the date of the most recent discussion, so that active forums
will be reindexed early even if they were created a long time ago.
mod/forum/classes/search/post.php
mod/forum/tests/search_test.php
search/classes/base.php
search/classes/base_block.php
search/classes/base_mod.php
search/tests/base_activity_test.php
search/tests/base_block_test.php
search/tests/base_test.php
search/upgrade.txt