ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.ilMailLuceneQueryParser.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 include_once 'Services/Search/classes/Lucene/class.ilLuceneQueryParser.php';
5 
12 {
16  protected $fields = array();
17 
21  public function parse()
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  }
40 
44  public function setFields($fields)
45  {
46  $this->fields = $fields;
47  }
48 
52  public function getFields()
53  {
54  return $this->fields;
55  }
56 }
$errors fields
Definition: imgupload.php:51
Create styles array
The data for the language used.