ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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
4include_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 {
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 }
48
52 public function setFields($fields)
53 {
54 $this->fields = $fields;
55 }
56
60 public function getFields()
61 {
62 return $this->fields;
63 }
64}
$errors fields
Definition: imgupload.php:48