Commit graph

13 commits

Author SHA1 Message Date
sam marshall
7ba2a20166 MDL-66326 Global search: Delete from index when courses are deleted
Adds new API support within search engines for optional methods to
delete data for courses and contexts, and implements this for the
two core search plugins (simpledb and solr).

The new API is automatically called when courses or contexts are
deleted. When a whole course is deleted, it only sends the course
delete rather than sending 1,000 separate context deletions as
each activity/block is deleted.
2019-08-23 11:51:50 +01:00
Amaia Anabitarte
c5b2f2b306 MDL-59502 Global Search: deprecate add_documents 4 arg implementation
In MDL-59039 we introduced changes to add_documents and should return an extra $partial boolean.
We still supported implementations returning 4 elements since then,
but  this issue is about removing this 4 returned elements compatibility.
2019-06-20 18:58:17 +02:00
Dmitrii Metelkin
2085e8603a MDL-62869 search: implement searching for all courses 2019-03-01 07:18:37 +11:00
David Monllao
c5a8065258 Merge branch 'MDL-61028-master' of https://github.com/sammarshallou/moodle 2018-04-23 13:09:53 +02:00
sam marshall
222a97ce76 MDL-61028 core_search: Allow filtering search by user (back-end, Solr)
Adds support in the Solr engine for a new 'userids' parameter to
restrict search results to those created by a specific user or users.
2018-04-20 13:36:55 +01:00
sam marshall
73fd56663b MDL-61102 core_search: Improve performance by reducing schema checks 2018-04-18 16:24:51 +01:00
sam marshall
fc440796e9 MDL-59434 core_search: Alternate result orders including by context
Implements a mechanism by which search engines can provide different
result orderings, and implements a 'by location' ordering within the
Solr search engine (available whenever the user starts their search
from within a course or activity).
2018-03-20 12:15:25 +00:00
sam marshall
4359ef18bb MDL-58885 core_search: Add group support
Adds group support to the core search API and the Solr search engine.
This allows for:

* User searching by group (in the API only, no interface yet)
* Automatically restrict search results by group (in some cases like
  separate-groups forums)
2018-02-16 16:57:00 +00: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
sam marshall
25564a784b 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.
2017-12-22 13:02:37 +00:00
sam marshall
427b756355 MDL-55356 core_search: New area API get_document_recordset
The search area API now includes a new function get_document_recordset
which should be implemented in preference to the older
get_recordset_by_timestamp. (It's also possible to implement both in
plugin search areas which need to work against older Moodle versions.)

Existing search areas without the new function will continue to work as
before (obviously without the new functionality).
2017-10-11 17:17:08 +01:00
sam marshall
67d6479581 MDL-59039 Global search: Allow partial indexing (in scheduled task) 2017-07-11 16:41:33 +01:00
David Monllao
5f654ea2c0 MDL-57243 search: Note about search area base classes relocation 2016-12-02 09:51:05 +08:00