add search terms to typeahead if configured

This commit is contained in:
Uwe Steinmann 2023-04-21 13:03:08 +02:00
parent 66ecc57780
commit 89e930ba00

View File

@ -196,7 +196,9 @@ if($fullsearch) {
$total = 0;
$index = $fulltextservice->Indexer();
if($index) {
// $terms = $index->terms($_GET['query']);
if(!empty($settings->_suggestTerms)) {
$terms = $index->terms($_GET['query'], $settings->_suggestTerms);
}
$lucenesearch = $fulltextservice->Search();
$searchresult = $lucenesearch->search($query, array('record_type'=>$record_type, 'owner'=>$ownernames, 'status'=>$status, 'category'=>$categorynames, 'user'=>$user->isAdmin() ? [] : [$user->getLogin()], 'mimetype'=>$mimetype, 'startFolder'=>$startFolder, 'rootFolder'=>$rootFolder, 'attributes'=>$attributes), ($pageNumber == 'all' ? array() : array('limit'=>$limit, 'offset'=>$limit * ($pageNumber-1))));
if($searchresult === false) {