ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilMailLuceneQueryParser Class Reference
+ Inheritance diagram for ilMailLuceneQueryParser:
+ Collaboration diagram for ilMailLuceneQueryParser:

Public Member Functions

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

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)
- Static Protected Member Functions inherited from ilLuceneQueryParser
static checkAllowedCharacters ($query)
 Check allowed characters.
static checkAsterisk ($query)
 Check asterisk.
static checkAmpersands ($query)
 Check ampersands.
static checkCaret ($query)
 Check carets.
static checkSquiggle ($query)
 Check squiggles.
static checkExclamationMark ($query)
 Check exclamation marks (replacement for NOT)
static checkQuestionMark ($query)
 Check question mark (wild card single character)
static checkParenthesis ($a_query)
 Check parenthesis.
static checkPlusMinus ($a_query)
 Check plus minus.
static checkANDORNOT ($a_query)
 Check AND OR NOT.
static checkQuotes ($a_query)
 Check quotes.
static checkColon ($a_query)
 Check colon.

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

ilMailLuceneQueryParser::getFields ( )
Returns
array

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

References $fields.

Referenced by parse().

{
return $this->fields;
}

+ Here is the caller graph for this function:

ilMailLuceneQueryParser::parse ( )

parse query string

Returns

Reimplemented from ilLuceneQueryParser.

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

References ilLuceneQueryParser\$query_string, and getFields().

{
if($this->getFields())
{
$queried_fields = array();
foreach($this->getFields() as $field => $status)
{
if($status)
{
$queried_fields[] = $field.':'.$this->query_string;
}
}
if($queried_fields)
{
$this->parsed_query = implode(' OR ', $queried_fields);
}
else
{
$this->parsed_query = $this->query_string;
}
}
else
{
$this->parsed_query = $this->query_string;
}
}

+ Here is the call graph for this function:

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

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

References $fields, and fields.

{
$this->fields = $fields;
}

Field Documentation

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: