ILIAS  trunk Revision v11.0_alpha-1715-g7fc467680fb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilLuceneAdvancedQueryParser Class Reference
+ 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 ()
 
- 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

Constructor & Destructor Documentation

◆ __construct()

ilLuceneAdvancedQueryParser::__construct (   $a_query_data)

Constructor.

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

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

41  {
43 
44  $this->field_definition = ilLuceneAdvancedSearchFields::getInstance();
45  $this->query_data = $a_query_data;
46  }
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ getFieldDefinition()

ilLuceneAdvancedQueryParser::getFieldDefinition ( )

Get field definition settings.

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

References $field_definition.

Referenced by parse().

52  {
54  }
ilLuceneAdvancedSearchFields $field_definition
Field definitions of advanced meta data search.
+ Here is the caller graph for this function:

◆ getQueryData()

ilLuceneAdvancedQueryParser::getQueryData ( )
Returns
array|string

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

References $query_data.

Referenced by parse().

60  {
61  if (is_array($this->query_data)) {
62  return $this->query_data;
63  }
64  return $this->query_data ?? '';
65  }
+ Here is the caller graph for this function:

◆ parse()

ilLuceneAdvancedQueryParser::parse ( )

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

References getFieldDefinition(), and getQueryData().

Referenced by ilLuceneAdvancedSearchGUI\performSearch(), and ilLuceneAdvancedSearchGUI\showSavedResults().

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

Field Documentation

◆ $field_definition

ilLuceneAdvancedSearchFields ilLuceneAdvancedQueryParser::$field_definition
protected

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

Referenced by getFieldDefinition().

◆ $query_data

ilLuceneAdvancedQueryParser::$query_data
protected

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

Referenced by getQueryData().


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