4include_once 
'Services/Search/classes/class.ilSearchSettings.php';
 
   18        include_once 
'./Services/Search/classes/Lucene/class.ilLuceneQueryParser.php';
 
   22        include_once 
'./Services/Search/classes/Lucene/class.ilLuceneSearcher.php';
 
   27        $res = $searcher->getResult()->getCandidates();
 
   36        foreach (
$res as $res_obj_id) {
 
   37            if (self::checkObjectPermission($res_obj_id)) {
 
   41            if ($num_entries >= $max_entries) {
 
   48        foreach ($list as $entry) {
 
   53        include_once 
'./Services/JSON/classes/class.ilJsonUtil.php';
 
   68        include_once 
'./Services/Search/classes/class.ilSearchSettings.php';
 
   74        $a_str = str_replace(
'"', 
"", $a_str);
 
   78        $object_types = array(
'cat',
'dbk',
'crs',
'fold',
'frm',
'grp',
'lm',
'sahs',
'glo',
'mep',
'htlm',
'exc',
'file',
'qpl',
'tst',
'svy',
'spl',
 
   79            'chat', 
'webr',
'mcst',
'sess',
'pg',
'st',
'gdf',
'wiki', 
'copa');
 
   81        $set = 
$ilDB->query(
"SELECT title, obj_id FROM object_data WHERE " 
   82            . 
$ilDB->like(
'title', 
'text', $a_str . 
"%") . 
" AND " 
   83            . 
$ilDB->in(
'type', $object_types, 
false, 
'text') . 
" ORDER BY title");
 
   84        $max = ($settings->getAutoCompleteLength() > 0)
 
   85            ? $settings->getAutoCompleteLength()
 
   92        while (($rec = 
$ilDB->fetchAssoc($set)) && $cnt < $max) {
 
   93            if (strpos($rec[
"title"], 
" ") > 0 || strpos($rec[
"title"], 
"-") > 0) {
 
   94                $rec[
"title"] = 
'"' . $rec[
"title"] . 
'"';
 
   96            if (!in_array($rec[
"title"], $list) && !in_array($rec[
"obj_id"], $checked)) {
 
   98                    $list[] = $lim . $rec[
"title"];
 
  101                $checked[] = $rec[
"obj_id"];
 
  105        $set = 
$ilDB->query(
"SELECT rbac_id,obj_id,obj_type, keyword FROM il_meta_keyword WHERE " 
  106            . 
$ilDB->like(
'keyword', 
'text', $a_str . 
"%") . 
" AND " 
  107            . 
$ilDB->in(
'obj_type', $object_types, 
false, 
'text') . 
" ORDER BY keyword");
 
  108        while (($rec = 
$ilDB->fetchAssoc($set)) && $cnt < $max) {
 
  109            if (strpos($rec[
"keyword"], 
" ") > 0) {
 
  110                $rec[
"keyword"] = 
'"' . $rec[
"keyword"] . 
'"';
 
  112            if (!in_array($rec[
"keyword"], $list) && !in_array($rec[
"rbac_id"], $checked)) {
 
  114                    $list[] = $lim . $rec[
"keyword"];
 
  118            $checked[] = $rec[
"rbac_id"];
 
  123        foreach ($list as $l) {
 
  129        include_once 
'./Services/JSON/classes/class.ilJsonUtil.php';
 
  140        $ilAccess = 
$DIC[
'ilAccess'];
 
  143        foreach ($refs as $ref) {
 
  144            if ($ilAccess->checkAccess(
"read", 
"", $ref)) {
 
An exception for terminatinating execution or to throw for unit testing.
static encode($mixed, $suppress_native=false)
static getInstance(ilLuceneQueryParser $qp)
Get singleton instance.
static _lookupTitle($a_id)
lookup object title
static _getAllReferences($a_id)
get all reference ids of object
Search Auto Completion Application Class.
static checkObjectPermission($a_obj_id)
Checks read permission on obj id.
static getList($a_str)
Get completion list.
static getLuceneList($a_str)
Performs better than standard like search on huge installations.
foreach($_POST as $key=> $value) $res