3 declare(strict_types=1);
46 private int $type = self::TYPE_STANDARD;
54 $this->setting = $DIC->settings();
56 $this->result->setCallback([$this,
'nextResultPage']);
57 $this->query_parser = $qp;
66 return self::$instance;
68 return self::$instance =
new ilLuceneSearcher($qp);
74 public function setType(
int $a_type): void
76 $this->type = $a_type;
102 if (!$this->query_parser->getQuery()) {
109 CLIENT_ID .
'_' . $this->setting->get(
'inst_id',
'0'),
111 $this->query_parser->getQuery()
119 $this->highlighter->setResultString(
$res);
120 $this->highlighter->parse();
130 $this->page_number++;
163 if (!$this->query_parser->getQuery()) {
168 case self::TYPE_USER:
171 CLIENT_ID .
'_' . $this->setting->get(
'inst_id',
'0'),
172 $this->query_parser->getQuery()
176 case self::TYPE_STANDARD:
179 CLIENT_ID .
'_' . $this->setting->get(
'inst_id',
'0'),
180 $this->query_parser->getQuery(),
195 $parser->parse($this->result);
ilLuceneSearchResult $result
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static ilLuceneSearcher $instance
static getLogger(string $a_component_id)
Get component logger.
static getInstance(ilLuceneQueryParser $qp)
Get singleton instance.
static factory(string $a_package, int $a_timeout=0)
Creates an ilRpcClient instance to our ilServer.
getHighlighter()
get highlighter
Reads and parses lucene search results.
Search result implementing iterator interface.
performSearch()
search lucene
getPageNumber()
get current page number
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setType(int $a_type)
Set search type.
nextResultPage()
get next result page
ilLuceneQueryParser $query_parser
__construct(ilLuceneQueryParser $qp)
highlight(array $a_obj_ids)
ilLuceneHighlighterResultParser $highlighter