ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
ilLikeMetaDataSearch Class Reference
+ Inheritance diagram for ilLikeMetaDataSearch:
+ Collaboration diagram for ilLikeMetaDataSearch:

Public Member Functions

 __createKeywordWhereCondition ()
 
 __createContributeWhereCondition ()
 
 __createTitleWhereCondition ()
 
 __createDescriptionWhereCondition ()
 
- Public Member Functions inherited from ilMetaDataSearch
 setMode (string $a_mode)
 
 getMode ()
 
 performSearch ()
 
 __createInStatement ()
 
 __searchContribute ()
 
 __searchKeywords ()
 
 __searchTitles ()
 
 __searchDescriptions ()
 
- Public Member Functions inherited from ilAbstractSearch
 __construct (ilQueryParser $qp_obj)
 
 setFields (array $a_fields)
 
 getFields ()
 
 setFilter (array $a_filter)
 
 setIdFilter (array $a_id_filter)
 
 getIdFilter ()
 
 appendToFilter (string $a_type)
 
 getFilter ()
 
 __createLocateString ()
 
 __prepareFound (object $row)
 
 performSearch ()
 

Additional Inherited Members

- Protected Member Functions inherited from ilAbstractSearch
 getValidObjectTypes (ilObjectDefinition $object_definition)
 
- Protected Attributes inherited from ilAbstractSearch
ilDBInterface $db
 
ilQueryParser $query_parser
 
ilSearchResult $search_result
 
array $object_types = []
 

Detailed Description

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

Member Function Documentation

◆ __createContributeWhereCondition()

ilLikeMetaDataSearch::__createContributeWhereCondition ( )

Definition at line 56 of file class.ilLikeMetaDataSearch.php.

56  : string
57  {
58  $concat = ' entity ';
59  $where = " WHERE (";
60  $counter = 0;
61  foreach ($this->query_parser->getQuotedWords() as $word) {
62  if ($counter++) {
63  $where .= "OR";
64  }
65  #$where .= $concat;
66  #$where .= (" LIKE ('%".$word."%')");
67  $where .= $this->db->like($concat, 'text', '%' . $word . '%');
68  }
69  return $where . ') ';
70  }

◆ __createDescriptionWhereCondition()

ilLikeMetaDataSearch::__createDescriptionWhereCondition ( )

Definition at line 99 of file class.ilLikeMetaDataSearch.php.

99  : string
100  {
101  $concat = ' description ';
102  $where = " WHERE (";
103  $counter = 0;
104  foreach ($this->query_parser->getQuotedWords() as $word) {
105  if ($counter++) {
106  $where .= "OR";
107  }
108  #$where .= $concat;
109  #$where .= (" LIKE ('%".$word."%')");
110  $where .= $this->db->like($concat, 'text', '%' . $word . '%');
111  }
112  return $where . ') ';
113  }

◆ __createKeywordWhereCondition()

ilLikeMetaDataSearch::__createKeywordWhereCondition ( )

Definition at line 40 of file class.ilLikeMetaDataSearch.php.

40  : string
41  {
42  $concat = ' keyword ';
43  $where = " WHERE (";
44  $counter = 0;
45  foreach ($this->query_parser->getQuotedWords() as $word) {
46  if ($counter++) {
47  $where .= "OR";
48  }
49  $where .= $this->db->like($concat, 'text', '%' . $word . '%');
50  #$where .= $concat;
51  #$where .= (" LIKE ('%".$word."%')");
52  }
53  return $where . ') ';
54  }

◆ __createTitleWhereCondition()

ilLikeMetaDataSearch::__createTitleWhereCondition ( )

Definition at line 71 of file class.ilLikeMetaDataSearch.php.

71  : string
72  {
73  /*
74  $concat = ' CONCAT(title,coverage) '; // broken if coverage is null
75  // DONE: fix coverage search
76  $concat = ' title ';
77  */
78 
79  $concat = $this->db->concat(
80  array(
81  array('title','text'),
82  array('coverage','text'))
83  );
84 
85 
86  $where = " WHERE (";
87  $counter = 0;
88  foreach ($this->query_parser->getQuotedWords() as $word) {
89  if ($counter++) {
90  $where .= "OR";
91  }
92  #$where .= $concat;
93  #$where .= (" LIKE ('%".$word."%')");
94  $where .= $this->db->like($concat, 'text', '%' . $word . '%');
95  }
96  return $where . ' )';
97  }

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