mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
MDL-55190 search: Limit search to non-files if disabled
This commit is contained in:
parent
5a1728df39
commit
e0867b2222
@ -316,6 +316,9 @@ class engine extends \core_search\engine {
|
||||
$query->setGroupLimit(3);
|
||||
$query->setGroupNGroups(true);
|
||||
$query->addGroupField('solr_filegroupingid');
|
||||
} else {
|
||||
// Make sure we only get text files, in case the index has pre-existing files.
|
||||
$query->addFilterQuery('type:'.\core_search\manager::TYPE_TEXT);
|
||||
}
|
||||
|
||||
return $query;
|
||||
|
Loading…
x
Reference in New Issue
Block a user