ILIAS  release_4-4 Revision
ilMailLuceneQueryParser Class Reference
+ Inheritance diagram for ilMailLuceneQueryParser:
+ Collaboration diagram for ilMailLuceneQueryParser:

Public Member Functions

 parse ()
 
 setFields ($fields)
 
 getFields ()
 
- Public Member Functions inherited from ilLuceneQueryParser
 __construct ($a_query_string)
 Constructor. More...
 
 parse ()
 parse query string More...
 
 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 60 of file class.ilMailLuceneQueryParser.php.

References $fields.

Referenced by parse().

+ Here is the caller graph for this function:

◆ parse()

ilMailLuceneQueryParser::parse ( )

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

References ilLuceneQueryParser\$query_string, and getFields().

22  {
23  if($this->getFields())
24  {
25  $queried_fields = array();
26  foreach($this->getFields() as $field => $status)
27  {
28  if($status)
29  {
30  $queried_fields[] = $field.':'.$this->query_string;
31  }
32  }
33 
34  if($queried_fields)
35  {
36  $this->parsed_query = implode(' OR ', $queried_fields);
37  }
38  else
39  {
40  $this->parsed_query = $this->query_string;
41  }
42  }
43  else
44  {
45  $this->parsed_query = $this->query_string;
46  }
47  }
+ Here is the call graph for this function:

◆ setFields()

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

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

References $fields, and fields.

53  {
54  $this->fields = $fields;
55  }
$errors fields
Definition: imgupload.php:47

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: