Go to the documentation of this file.00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00035 include_once 'Services/Search/classes/class.ilMetaDataSearch.php';
00036
00037 class ilFulltextMetaDataSearch extends ilMetaDAtaSearch
00038 {
00039
00044 function ilFulltextMetaDataSearch(&$qp_obj)
00045 {
00046 parent::ilMetaDataSearch($qp_obj);
00047 }
00048
00049
00050 function __createKeywordWhereCondition()
00051 {
00052
00053 if($this->db->isMysql4_0OrHigher())
00054 {
00055 $query .= " WHERE MATCH(keyword) AGAINST('";
00056 foreach($this->query_parser->getQuotedWords(true) as $word)
00057 {
00058 $query .= $word;
00059 $query .= '* ';
00060 }
00061 $query .= "' IN BOOLEAN MODE) ";
00062 }
00063 else
00064 {
00065
00066 $query .= " WHERE MATCH (keyword) AGAINST(' ";
00067 foreach($this->query_parser->getQuotedWords(true) as $word)
00068 {
00069 $query .= $word;
00070 $query .= ' ';
00071 }
00072 $query .= "') ";
00073 }
00074 return $query;
00075 }
00076 function __createContributeWhereCondition()
00077 {
00078
00079 if($this->db->isMysql4_0OrHigher())
00080 {
00081 $query .= " WHERE MATCH(entity) AGAINST('";
00082 foreach($this->query_parser->getQuotedWords(true) as $word)
00083 {
00084 $query .= $word;
00085 $query .= '* ';
00086 }
00087 $query .= "' IN BOOLEAN MODE) ";
00088 }
00089 else
00090 {
00091
00092 $query .= " WHERE MATCH (entity) AGAINST(' ";
00093 foreach($this->query_parser->getQuotedWords(true) as $word)
00094 {
00095 $query .= $word;
00096 $query .= ' ';
00097 }
00098 $query .= "') ";
00099 }
00100 return $query;
00101 }
00102 function __createTitleWhereCondition()
00103 {
00104
00105 if($this->db->isMysql4_0OrHigher())
00106 {
00107 $query .= " WHERE MATCH(title,coverage) AGAINST('";
00108 foreach($this->query_parser->getQuotedWords(true) as $word)
00109 {
00110 $query .= $word;
00111 $query .= '* ';
00112 }
00113 $query .= "' IN BOOLEAN MODE) ";
00114 }
00115 else
00116 {
00117
00118 $query .= " WHERE MATCH (title,coverage) AGAINST(' ";
00119 foreach($this->query_parser->getQuotedWords(true) as $word)
00120 {
00121 $query .= $word;
00122 $query .= ' ';
00123 }
00124 $query .= "') ";
00125 }
00126 return $query;
00127 }
00128 function __createDescriptionWhereCondition()
00129 {
00130
00131 if($this->db->isMysql4_0OrHigher())
00132 {
00133 $query .= " WHERE MATCH(description) AGAINST('";
00134 foreach($this->query_parser->getQuotedWords(true) as $word)
00135 {
00136 $query .= $word;
00137 $query .= '* ';
00138 }
00139 $query .= "' IN BOOLEAN MODE) ";
00140 }
00141 else
00142 {
00143
00144 $query .= " WHERE MATCH (description) AGAINST(' ";
00145 foreach($this->query_parser->getQuotedWords(true) as $word)
00146 {
00147 $query .= $word;
00148 $query .= ' ';
00149 }
00150 $query .= "') ";
00151 }
00152 return $query;
00153 }
00154 }
00155 ?>