ILIAS  Release_3_10_x_branch Revision 61812
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilFulltextShopMetaDataSearch Class Reference
+ Inheritance diagram for ilFulltextShopMetaDataSearch:
+ Collaboration diagram for ilFulltextShopMetaDataSearch:

Public Member Functions

 __construct ($qp_obj)
 __createKeywordWhereCondition ()
 __createContributeWhereCondition ()
 __createTitleWhereCondition ()
 __createDescriptionWhereCondition ()
- Public Member Functions inherited from ilShopMetaDataSearch
 setCustomSearchResultObject ($a_search_result_obect)
 setFilterShopTopicId ($a_topic_id)
 getFilterShopTopicId ()
 setMode ($a_mode)
 getMode ()
 performSearch ()
- Public Member Functions inherited from ilAbstractSearch
 ilAbstractSearch (&$qp_obj)
 Constructor public.
 setFields ($a_fields)
 Set fields to search.
 getFields ()
 Get fields to search.
 setFilter ($a_filter)
 set object type to search in
 appendToFilter ($a_type)
 Append object type to filter.
 getFilter ()
 get object type to search in
 __createLocateString ()
 build locate string in case of AND search
 __prepareFound (&$row)

Additional Inherited Members

- Data Fields inherited from ilShopMetaDataSearch
 $mode = ''
 $query_parser = null
 $db = null

Detailed Description

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

Constructor & Destructor Documentation

ilFulltextShopMetaDataSearch::__construct (   $qp_obj)

Reimplemented from ilShopMetaDataSearch.

Definition at line 38 of file class.ilFulltextShopMetaDataSearch.php.

{
}

Member Function Documentation

ilFulltextShopMetaDataSearch::__createContributeWhereCondition ( )

Definition at line 89 of file class.ilFulltextShopMetaDataSearch.php.

{
// IN BOOLEAN MODE
if($this->db->isMysql4_0OrHigher())
{
$query .= " WHERE (payment_objects.status = 1 OR payment_objects.status = 2) ";
$agaings_str = '';
foreach($this->query_parser->getQuotedWords(true) as $word)
{
if(strlen($word))
{
$agaings_str .= $word;
$agaings_str .= '* ';
}
}
if(strlen($agaings_str))
{
$query .= " AND MATCH (entity) AGAINST(' ";
$query .= $agaings_str;
$query .= "' IN BOOLEAN MODE) ";
}
}
else
{
// i do not see any reason, but MATCH AGAINST(...) OR MATCH AGAINST(...) does not use an index
$query .= " WHERE (payment_objects.status = 1 OR payment_objects.status = 2) ";
$agaings_str = '';
foreach($this->query_parser->getQuotedWords(true) as $word)
{
if(strlen($word))
{
$agaings_str .= ($word.' ');
}
}
if(strlen($agaings_str))
{
$query .= " AND MATCH (entity) AGAINST(' ";
$query .= $agaings_str;
$query .= "') ";
}
}
return $query;
}
ilFulltextShopMetaDataSearch::__createDescriptionWhereCondition ( )

Definition at line 181 of file class.ilFulltextShopMetaDataSearch.php.

{
// IN BOOLEAN MODE
if($this->db->isMysql4_0OrHigher())
{
$query .= " WHERE (payment_objects.status = 1 OR payment_objects.status = 2) ";
$agaings_str = '';
foreach($this->query_parser->getQuotedWords(true) as $word)
{
if(strlen($word))
{
$agaings_str .= $word;
$agaings_str .= '* ';
}
}
if(strlen($agaings_str))
{
$query .= " AND MATCH (description) AGAINST(' ";
$query .= $agaings_str;
$query .= "' IN BOOLEAN MODE) ";
}
}
else
{
// i do not see any reason, but MATCH AGAINST(...) OR MATCH AGAINST(...) does not use an index
$query .= " WHERE (payment_objects.status = 1 OR payment_objects.status = 2) ";
$agaings_str = '';
foreach($this->query_parser->getQuotedWords(true) as $word)
{
if(strlen($word))
{
$agaings_str .= ($word.' ');
}
}
if(strlen($agaings_str))
{
$query .= " AND MATCH (description) AGAINST(' ";
$query .= $agaings_str;
$query .= "') ";
}
}
return $query;
}
ilFulltextShopMetaDataSearch::__createKeywordWhereCondition ( )

Definition at line 43 of file class.ilFulltextShopMetaDataSearch.php.

{
// IN BOOLEAN MODE
if($this->db->isMysql4_0OrHigher())
{
$query .= " WHERE (payment_objects.status = 1 OR payment_objects.status = 2) ";
$agaings_str = '';
foreach($this->query_parser->getQuotedWords(true) as $word)
{
if(strlen($word))
{
$agaings_str .= $word;
$agaings_str .= '* ';
}
}
if(strlen($agaings_str))
{
$query .= " AND MATCH (keyword) AGAINST(' ";
$query .= $agaings_str;
$query .= "' IN BOOLEAN MODE) ";
}
}
else
{
// i do not see any reason, but MATCH AGAINST(...) OR MATCH AGAINST(...) does not use an index
$query .= " WHERE (payment_objects.status = 1 OR payment_objects.status = 2) ";
$agaings_str = '';
foreach($this->query_parser->getQuotedWords(true) as $word)
{
if(strlen($word))
{
$agaings_str .= ($word.' ');
}
}
if(strlen($agaings_str))
{
$query .= " AND MATCH (keyword) AGAINST(' ";
$query .= $agaings_str;
$query .= "') ";
}
}
return $query;
}
ilFulltextShopMetaDataSearch::__createTitleWhereCondition ( )

Definition at line 135 of file class.ilFulltextShopMetaDataSearch.php.

{
// IN BOOLEAN MODE
if($this->db->isMysql4_0OrHigher())
{
$query .= " WHERE (payment_objects.status = 1 OR payment_objects.status = 2) ";
$agaings_str = '';
foreach($this->query_parser->getQuotedWords(true) as $word)
{
if(strlen($word))
{
$agaings_str .= $word;
$agaings_str .= '* ';
}
}
if(strlen($agaings_str))
{
$query .= " AND MATCH (title,coverage) AGAINST(' ";
$query .= $agaings_str;
$query .= "' IN BOOLEAN MODE) ";
}
}
else
{
// i do not see any reason, but MATCH AGAINST(...) OR MATCH AGAINST(...) does not use an index
$query .= " WHERE (payment_objects.status = 1 OR payment_objects.status = 2) ";
$agaings_str = '';
foreach($this->query_parser->getQuotedWords(true) as $word)
{
if(strlen($word))
{
$agaings_str .= ($word.' ');
}
}
if(strlen($agaings_str))
{
$query .= " AND MATCH (title,coverage) AGAINST(' ";
$query .= $agaings_str;
$query .= "') ";
}
}
return $query;
}

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