mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-16 14:41:39 +00:00
add search terms to typeahead if configured
This commit is contained in:
parent
66ecc57780
commit
89e930ba00
|
@ -196,7 +196,9 @@ if($fullsearch) {
|
||||||
$total = 0;
|
$total = 0;
|
||||||
$index = $fulltextservice->Indexer();
|
$index = $fulltextservice->Indexer();
|
||||||
if($index) {
|
if($index) {
|
||||||
// $terms = $index->terms($_GET['query']);
|
if(!empty($settings->_suggestTerms)) {
|
||||||
|
$terms = $index->terms($_GET['query'], $settings->_suggestTerms);
|
||||||
|
}
|
||||||
$lucenesearch = $fulltextservice->Search();
|
$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))));
|
$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) {
|
if($searchresult === false) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user