Skip to content

Commit

Permalink
MDL-55190 search: Limit search to non-files if disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
ericmerrill committed Jul 13, 2016
1 parent 5a1728d commit e0867b2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions search/engine/solr/classes/engine.php
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,9 @@ protected function create_user_query($filters, $usercontexts) {
$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;
Expand Down

0 comments on commit e0867b2

Please sign in to comment.