ILIAS  release_8 Revision v8.25-1-g13de6a5eca6
ilLuceneAdvancedQueryParser Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for ilLuceneAdvancedQueryParser:
+ Collaboration diagram for ilLuceneAdvancedQueryParser:

Public Member Functions

 __construct ($a_query_data)
 Constructor. More...
 
 getFieldDefinition ()
 Get field definition settings. More...
 
 getQueryData ()
 
 parse ()
 parse query string More...
 
- Public Member Functions inherited from ilLuceneQueryParser
 __construct ($a_query_string)
 Constructor. More...
 
 parse ()
 parse query string More...
 
 parseAutoWildcard ()
 Append asterisk for remote search from global search form field. More...
 
 getQuery ()
 

Protected Attributes

ilLuceneAdvancedSearchFields $field_definition
 
 $query_data
 
- Protected Attributes inherited from ilLuceneQueryParser
string $query_string
 
string $parsed_query = ''
 

Additional Inherited Members

- Static Public Member Functions inherited from ilLuceneQueryParser
static validateQuery ($a_query)
 
- Protected Member Functions inherited from ilLuceneQueryParser
 replaceOwnerCallback (array $matches)
 Replace owner callback (preg_replace_callback) More...
 
- Static Protected Member Functions inherited from ilLuceneQueryParser
static checkAllowedCharacters (string $query)
 Check allowed characters. More...
 
static checkAsterisk (string $query)
 Check asterisk. More...
 
static checkAmpersands (string $query)
 Check ampersands. More...
 
static checkCaret (string $query)
 Check carets. More...
 
static checkSquiggle (string $query)
 Check squiggles. More...
 
static checkExclamationMark (string $query)
 Check exclamation marks (replacement for NOT) More...
 
static checkQuestionMark (string $query)
 Check question mark (wild card single character) More...
 
static checkParenthesis (string $a_query)
 Check parenthesis. More...
 
static checkPlusMinus (string $a_query)
 Check plus minus. More...
 
static checkANDORNOT (string $a_query)
 Check AND OR NOT. More...
 
static checkQuotes (string $a_query)
 Check quotes. More...
 
static checkColon (string $a_query)
 Check colon. More...
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om

Definition at line 30 of file class.ilLuceneAdvancedQueryParser.php.

Constructor & Destructor Documentation

◆ __construct()

ilLuceneAdvancedQueryParser::__construct (   $a_query_data)

Constructor.

Reimplemented from ilLuceneQueryParser.

Definition at line 41 of file class.ilLuceneAdvancedQueryParser.php.

42 {
44
45 $this->field_definition = ilLuceneAdvancedSearchFields::getInstance();
46 $this->query_data = $a_query_data;
47 }
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References ILIAS\GlobalScreen\Provider\__construct(), and ilLuceneAdvancedSearchFields\getInstance().

+ Here is the call graph for this function:

Member Function Documentation

◆ getFieldDefinition()

ilLuceneAdvancedQueryParser::getFieldDefinition ( )

Get field definition settings.

Definition at line 52 of file class.ilLuceneAdvancedQueryParser.php.

53 {
55 }
ilLuceneAdvancedSearchFields $field_definition
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References $field_definition.

Referenced by parse().

+ Here is the caller graph for this function:

◆ getQueryData()

ilLuceneAdvancedQueryParser::getQueryData ( )
Returns
array|string

Definition at line 60 of file class.ilLuceneAdvancedQueryParser.php.

61 {
62 if (is_array($this->query_data)) {
63 return $this->query_data;
64 }
65 return $this->query_data ?? '';
66 }

References $query_data.

Referenced by parse().

+ Here is the caller graph for this function:

◆ parse()

ilLuceneAdvancedQueryParser::parse ( )

parse query string

Returns
void

Reimplemented from ilLuceneQueryParser.

Definition at line 68 of file class.ilLuceneAdvancedQueryParser.php.

68 : void
69 {
70 foreach ((array) $this->getQueryData() as $field => $query) {
71 if (!is_array($query) && !trim($query)) {
72 continue;
73 }
74 $parsed = $this->getFieldDefinition()->parseFieldQuery((string) $field, $query);
75 if (strlen($parsed)) {
76 $this->parsed_query .= " +(";
77 $this->parsed_query .= $parsed;
78 $this->parsed_query .= ") ";
79 }
80 }
81 }
getFieldDefinition()
Get field definition settings.
$query

References $query, getFieldDefinition(), and getQueryData().

+ Here is the call graph for this function:

Field Documentation

◆ $field_definition

ilLuceneAdvancedSearchFields ilLuceneAdvancedQueryParser::$field_definition
protected

Definition at line 32 of file class.ilLuceneAdvancedQueryParser.php.

Referenced by getFieldDefinition().

◆ $query_data

ilLuceneAdvancedQueryParser::$query_data
protected

Definition at line 36 of file class.ilLuceneAdvancedQueryParser.php.

Referenced by getQueryData().


The documentation for this class was generated from the following file: