ILIAS  release_7 Revision v7.30-3-g800a261c036
ilMailLuceneQueryParser Class Reference
+ Inheritance diagram for ilMailLuceneQueryParser:
+ Collaboration diagram for ilMailLuceneQueryParser:

Public Member Functions

 parse ()
 parse query string More...
 
 setFields ($fields)
 
 getFields ()
 
- Public Member Functions inherited from ilLuceneQueryParser
 __construct ($a_query_string)
 Constructor. More...
 
 parse ()
 parse query string More...
 
 parseAutoWildcard ()
 
 getQuery ()
 get query More...
 

Protected Attributes

 $fields = array()
 
- Protected Attributes inherited from ilLuceneQueryParser
 $query_string
 
 $parsed_query
 

Additional Inherited Members

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

Detailed Description

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

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

Member Function Documentation

◆ getFields()

ilMailLuceneQueryParser::getFields ( )
Returns
array

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

References $fields.

Referenced by parse().

+ Here is the caller graph for this function:

◆ parse()

ilMailLuceneQueryParser::parse ( )

parse query string

Returns

Reimplemented from ilLuceneQueryParser.

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

22 {
23 if ($this->getFields()) {
24 $queried_fields = array();
25 foreach ($this->getFields() as $field => $status) {
26 if ($status) {
27 $queried_fields[] = $field . ':' . $this->query_string;
28 }
29 }
30
31 if ($queried_fields) {
32 $this->parsed_query = implode(' OR ', $queried_fields);
33 } else {
34 $this->parsed_query = $this->query_string;
35 }
36 } else {
37 $this->parsed_query = $this->query_string;
38 }
39 }

References ilLuceneQueryParser\$query_string, and getFields().

+ Here is the call graph for this function:

◆ setFields()

ilMailLuceneQueryParser::setFields (   $fields)
Parameters
array$fields

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

45 {
46 $this->fields = $fields;
47 }
$errors fields
Definition: imgupload.php:51

References $fields, and fields.

Field Documentation

◆ $fields

ilMailLuceneQueryParser::$fields = array()
protected

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

Referenced by getFields(), and setFields().


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