ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilFulltextWikiContentSearch Class Reference

Class ilFulltextWikiContentSearch. More...

+ Inheritance diagram for ilFulltextWikiContentSearch:
+ Collaboration diagram for ilFulltextWikiContentSearch:

Public Member Functions

 __createWhereCondition ()
 
- Public Member Functions inherited from ilWikiContentSearch
 performSearch ()
 
 __createInStatement ()
 
- Public Member Functions inherited from ilAbstractSearch
 __construct ($qp_obj)
 Constructor public. More...
 
 setFields ($a_fields)
 Set fields to search. More...
 
 getFields ()
 Get fields to search. More...
 
 setFilter ($a_filter)
 set object type to search in More...
 
 setIdFilter ($a_id_filter)
 Set id filter Filters search by given object id. More...
 
 getIdFilter ()
 Get Id filter. More...
 
 appendToFilter ($a_type)
 Append object type to filter. More...
 
 getFilter ()
 get object type to search in More...
 
 __createLocateString ()
 build locate string in case of AND search More...
 
 __prepareFound (&$row)
 
 performSearch ()
 

Additional Inherited Members

- Data Fields inherited from ilAbstractSearch
 $db = null
 
 $query_parser = null
 
 $search_result = null
 
 $object_types
 

Detailed Description

Class ilFulltextWikiContentSearch.

class for searching meta

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 35 of file class.ilFulltextWikiContentSearch.php.

Member Function Documentation

◆ __createWhereCondition()

ilFulltextWikiContentSearch::__createWhereCondition ( )

Definition at line 37 of file class.ilFulltextWikiContentSearch.php.

38  {
39  // IN BOOLEAN MODE
40  if ($this->db->getDbType() == "mysql") {
41  $where .= " WHERE MATCH(content,title) AGAINST('";
42  foreach ($this->query_parser->getQuotedWords(true) as $word) {
43  $where .= $word;
44  $where .= '* ';
45  }
46  $where .= "' IN BOOLEAN MODE) ";
47  } elseif ($this->db->getDbType() == "oracle") {
48  // fallback to like
49  $where.= " WHERE ";
50  foreach ($this->query_parser->getQuotedWords(true) as $word) {
51  $where.= " " . $sep . " ";
52  $where.= $this->db->like("content", "clob", $word);
53  $where.= " OR ";
54  $where.= $this->db->like("title", "text", $word);
55  $sep = "OR";
56  }
57  }
58  return $where;
59  }

The documentation for this class was generated from the following file: