64 Commits

Author SHA1 Message Date
Adam Olley
7f83e99e5f MDL-60707 core_search: In tests, use faked time for indexing length
Without this change its possible that the unit tests will fail at any time.
Before this change the indexing time is measured by real-time, not fake time,
making all index timings 0.

This happens as PHP offers no guarantee around the sort-order of an array for
any given two members that equate as equal. It just happens to pass for the
current array of search areas in vanilla Moodle.
2017-11-09 10:49:53 +10:30
sam marshall
401710883b MDL-60705 core_search: Unit tests get time wrong by factor 1 million 2017-11-06 11:50:43 +00:00
sam marshall
82735dec4d MDL-60555 core_search: Change unit tests to use fake time
Using real time caused rare failures. I've changed it to use fake
measurement for the indexing timeouts, which were unit-tested.
2017-10-31 14:48:09 +00:00
Jun Pataleta
098f37c942 MDL-55356 search: Remove unnecessary var_dump call 2017-10-12 15:45:52 +08:00
Andrew Nicols
c1c6ed1b67 MDL-55356 search: Merge conflict fix 2017-10-12 11:54:04 +08:00
Andrew Nicols
ed15e64a3d MDL-55356 search: Insert non-empty default data in block fixture data 2017-10-12 11:53:06 +08:00
Andrew Nicols
e61ad18e70 Merge branch 'MDL-55356-master' of https://github.com/sammarshallou/moodle 2017-10-12 11:28:04 +08:00
sam marshall
74b7a42d0d MDL-55356 core_search: Make indexing task/CLI do context requests 2017-10-11 17:17:10 +01:00
sam marshall
4ba11aa907 MDL-55356 core_search: New manager API index_context
New function which uses the get_document_recordset function in
search areas to support full and partial indexing of a given
context.
2017-10-11 17:17:10 +01: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
eacb2bd11b MDL-55356 core_search: API to queue contexts for indexing
New API \core_search\manager::request_index($context, $areaid = '')
adds the given context to a list which is intended to be indexed
later by the scheduled task.
2017-10-11 17:17:07 +01:00
sam marshall
2d2fcc1c9e MDL-60357 core_search: Future modified times cause serious problems 2017-10-06 13:38:32 +01:00
sam marshall
2d94d4ea7c MDL-59913 Global search: Allow search of non-enrolled courses 2017-09-29 16:30:37 +01:00
Eloy Lafuente (stronk7)
583b297d6c MDL-59926 behat: Make the search bootstrapbase + boost compatible
By combining the title attribute search with the "icon" class instead
of old "img" or new "i" elements we achieve that without too much
complication.
2017-09-14 01:26:30 +02:00
Eloy Lafuente (stronk7)
2e6112dd3f Merge branch 'MDL-59926-master' of https://github.com/sammarshallou/moodle 2017-09-12 00:27:49 +02:00
sam marshall
e36eefaeea MDL-59926 core_search: Allow Behat testing of results screens 2017-09-04 17:42:53 +01:00
Matt Porritt
4e921569d0 MDL-59459 Golbal Search: Increase file indexing coverage
Increase the scope of the files that are detected and
indexed by Moodle's Global Search. This includes intro
and content areas of search areas. The use case here is
in a description for an activity there is a file added
that contains more information about the activity.
It would an advantage to be able to search this content
as well. It would also allow search engine plugins to be
able to index non text files such as images.
2017-09-02 10:28:17 +10:00
Simey Lameze
a14907faa8 MDL-58957 core_block: fix link to site home 2017-07-13 11:10:36 +08:00
David Monllao
afabbd110e Merge branch 'MDL-59039-master' of https://github.com/sammarshallou/moodle 2017-07-11 21:49:03 +02:00
sam marshall
67d6479581 MDL-59039 Global search: Allow partial indexing (in scheduled task) 2017-07-11 16:41:33 +01:00
sam marshall
902be008db MDL-58957 Global search: Unit test for block searching 2017-06-30 13:10:14 +01:00
sam marshall
a96faa49a8 MDL-58957 Global search: Add block support to search manager 2017-06-30 13:10:12 +01:00
Andrew Nicols
674de8e51e Merge branch 'MDL-55191_master' of git://github.com/dmonllao/moodle 2016-09-20 11:41:03 +08:00
David Monllao
e71061a22b MDL-55191 search: Generate an search result viewed event 2016-09-15 09:36:49 +08:00
Eric Merrill
1aaead91f9 MDL-55725 search: Index proper time modified with indexed files 2016-09-07 17:33:28 -04:00
David Monllao
f3d38863fe MDL-55390 search: is_search_area unit tests
Added extra checking for search manager get_search_area.
2016-08-09 15:51:30 +08:00
David Monllao
0bd8383a8b MDL-55278 search: Updating references to area namespace 2016-07-21 18:38:18 +02:00
Dan Poltawski
b76edf3cfa Merge branch 'MDL-54926-master' of git://github.com/merrill-oakland/moodle 2016-07-11 16:54:40 +01:00
Dan Poltawski
64ec975e19 Merge branch 'MDL-55082-master' of git://github.com/merrill-oakland/moodle 2016-07-11 15:20:48 +01:00
David Monllao
6a4c2146f9 MDL-53222 search: Replace report_search by new searchareas admin page 2016-07-11 11:49:14 +02:00
Eric Merrill
55b62370aa MDL-55082 search: Update core areas to return results in time ASC order 2016-06-30 11:11:35 -04:00
Eric Merrill
4e2b5191d4 MDL-54926 search: Reduce over-escaping in results 2016-06-28 16:33:29 -04:00
David Monllao
25ba053ff2 MDL-54707 search: Add user context to get_areas_user_accesses 2016-06-26 21:23:16 +02:00
David Monllao
724703d3e1 MDL-53170 search: Specify core_course mycourses search level 2016-05-11 17:22:24 +08:00
Eloy Lafuente (stronk7)
33952d4a53 Merge branch 'MDL-53758-master' of git://github.com/merrill-oakland/moodle 2016-04-26 20:34:20 +02:00
Eric Merrill
053118a184 MDL-53758 search: Better results with low hit rates, improve performance
Ensures that Solr will return available results, even if there are many
misses when using check_access(), by asking Solr for more results if the
counter says there should be more.

Improves performance by ending processing as soon as the requested page
of results is processed. Remaining number of pages is an "estimate"
based on the total result count from Solr and how many items we have
rejected up to this point.
2016-04-17 21:59:25 -04:00
Eric Merrill
427e3cbcd6 MDL-53167 search: Add ability to limit courses searched 2016-04-07 14:41:59 -04:00
David Monllao
3dab4841e5 MDL-53272 search: Unit tests to discard caching issues 2016-04-04 15:38:03 +08:00
Eric Merrill
091973dbd7 MDL-53515 search: Extend search API to allow file indexing 2016-03-24 15:44:27 -04:00
Eloy Lafuente (stronk7)
3edc162611 Merge branch 'MDL-53354-master' of git://github.com/merrill-oakland/moodle 2016-03-16 01:09:45 +01:00
Eric Merrill
f6b425e2de MDL-53354 search: Add ability to limit search doc to a user 2016-03-10 09:19:05 -05:00
Eric Merrill
075fa91271 MDL-53325 search: Remove commit from engine interface
Remove commit from engine, and instead notify when indexes
start and stop, allowing them to decide what to do.
2016-03-06 13:46:54 -05:00
David Monllao
69d66020ce MDL-31989 search: get_config method to search areas
Also content_to_text moved to weblib.
2016-02-23 10:47:59 +00:00
David Monllao
db48207e1a MDL-31989 search: Search API and search engine API
Introducing both APIs in moodle along with:
- search_box widget to add a tiny search box
- admin settings with setup steps helper
- cache for search results
- template for a search result
- php unit stuff

Many thanks to Tomasz Muras, Prateek Sachan and Daniel Neis for their contributions, for starting this development
and for pushing for it to be completed. Also thanks to other contributors: Jonathan Harker and eugeneventer.
2016-02-23 10:47:58 +00:00
Petr Skoda
f68cef22b9 MDL-29923 remove all traces of experimental global search
Hopefully it will be replaced by something fully functional soon, see http://moodle.org/mod/forum/discuss.php?d=189023
2011-10-28 10:20:00 +02:00
Petr Skoda
cbad562eee MDL-25314 improved prevention of output buffering + detection of misconfigured servers
Scripts that do not want buffered output just define NO_OUTPUT_BUFFERING before including config.php.
The fileserving code now checks if the headers are already sent which detects misconfigured servers.
2010-11-19 03:40:43 +00:00
Aparup Banerjee
f087953c9a global search MDL-24625 fixed page headers sequence error. 2010-10-28 03:40:55 +00:00
Petr Skoda
4f0c2d0009 MDL-21655 big scary enrolment and roles improvements - see tacker for list of changes, includes other minor fixes too 2010-03-31 07:41:31 +00:00
diml
d8f209e84d MDL-18672 and MDL-18679 fixed. DIRECTORY_SEPARATOR / PATH_SEPARATOR mismatch 2009-03-25 21:28:43 +00:00
diml
4b3d092ec2 Addresses the tracker MDL - 18638 2009-03-23 20:43:38 +00:00