ILIAS  release_8 Revision v8.24
ilMailLuceneQueryParser Class Reference
+ Inheritance diagram for ilMailLuceneQueryParser:
+ Collaboration diagram for ilMailLuceneQueryParser:

Public Member Functions

 parse ()
 parse query string More...
 
 setFields (array $fields)
 
 getFields ()
 
- 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

array $fields = []
 
- 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

Author
Michael Jansen mjans.nosp@m.en@d.nosp@m.ataba.nosp@m.y.de

Definition at line 25 of file class.ilMailLuceneQueryParser.php.

Member Function Documentation

◆ getFields()

ilMailLuceneQueryParser::getFields ( )

Definition at line 54 of file class.ilMailLuceneQueryParser.php.

54 : array
55 {
56 return $this->fields;
57 }

References $fields.

Referenced by parse().

+ Here is the caller graph for this function:

◆ parse()

ilMailLuceneQueryParser::parse ( )

parse query string

Returns
void

Reimplemented from ilLuceneQueryParser.

Definition at line 29 of file class.ilMailLuceneQueryParser.php.

29 : void
30 {
31 if ($this->getFields()) {
32 $queried_fields = [];
33 foreach ($this->getFields() as $field => $status) {
34 if ($status) {
35 $queried_fields[] = $field . ':' . $this->query_string;
36 }
37 }
38
39 if ($queried_fields) {
40 $this->parsed_query = implode(' OR ', $queried_fields);
41 } else {
42 $this->parsed_query = $this->query_string;
43 }
44 } else {
45 $this->parsed_query = $this->query_string;
46 }
47 }

References ilLuceneQueryParser\$query_string, and getFields().

+ Here is the call graph for this function:

◆ setFields()

ilMailLuceneQueryParser::setFields ( array  $fields)

Definition at line 49 of file class.ilMailLuceneQueryParser.php.

49 : void
50 {
51 $this->fields = $fields;
52 }
$errors fields
Definition: imgupload.php:67

References $fields, and fields.

Field Documentation

◆ $fields

array ilMailLuceneQueryParser::$fields = []
protected

Definition at line 27 of file class.ilMailLuceneQueryParser.php.

Referenced by getFields(), and setFields().


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