KWeb  6.4
KWebSearch_Indexer_Sql Class Reference

SQL Indexer - operates directly on the database. More...

Inheritance diagram for KWebSearch_Indexer_Sql:
KWebSearch_Indexer

Public Member Functions

 searchInitialize (KWebSearch $search)
 Called in constructor of KWebSearch that will be using this indexer.
 searchFinish ()
 addSqlQuery ($sql)
 Adds SQL query to current search.
 useExpansion ()
 getSqlFullTextMatch ($columns, $fullText=true)
 getSqlMatchQuery ($table, $columns, $fullText=true, $useLang= 'item_lang', $idColumn= 'item_id', $genre=GENRE_ITEM)
 prepareQueries ()
 prepareSql ()
 searchRun (KWebSearch $search)
 Runs the search query and returns the result.
 expandQuery (KWebSearch $search)

Static Public Member Functions

static instance ($id, $create=true)
 Returns instance of the FileDiscoverer specified by id (e.g.

Data Fields

 $useMatchAgainst = false

Protected Member Functions

 __construct ($id)

Protected Attributes

 $sqlQueries = array()
 $sqlQuery = false
 $queryLikes = array()

Detailed Description

SQL Indexer - operates directly on the database.

Builds sql query on the fly


Constructor & Destructor Documentation

KWebSearch_Indexer_Sql::__construct ( id) [protected]

Reimplemented from KWebSearch_Indexer.


Member Function Documentation

KWebSearch_Indexer_Sql::addSqlQuery ( sql)

Adds SQL query to current search.

Warning:
Zapytanie może generować TYLKO kolumny: genre, id, score
KWebSearch_Indexer_Sql::expandQuery ( KWebSearch search)

Reimplemented from KWebSearch_Indexer.

KWebSearch_Indexer_Sql::getSqlFullTextMatch ( columns,
fullText = true 
)
KWebSearch_Indexer_Sql::getSqlMatchQuery ( table,
columns,
fullText = true,
useLang = 'item_lang',
idColumn = 'item_id',
genre = GENRE_ITEM 
)
static KWebSearch_Indexer_Sql::instance ( id,
create = true 
) [static]

Returns instance of the FileDiscoverer specified by id (e.g.

class, image, js and so on)

Returns:
KWebSearch_Indexer

Reimplemented from KWebSearch_Indexer.

KWebSearch_Indexer_Sql::prepareQueries ( )
KWebSearch_Indexer_Sql::prepareSql ( )
KWebSearch_Indexer_Sql::searchFinish ( )

Reimplemented from KWebSearch_Indexer.

KWebSearch_Indexer_Sql::searchInitialize ( KWebSearch search)

Called in constructor of KWebSearch that will be using this indexer.

Parameters:
$searchKWebSearch

Reimplemented from KWebSearch_Indexer.

KWebSearch_Indexer_Sql::searchRun ( KWebSearch search)

Runs the search query and returns the result.

Returns:
KWebCollection_Objects

Reimplemented from KWebSearch_Indexer.

KWebSearch_Indexer_Sql::useExpansion ( )

Field Documentation

KWebSearch_Indexer_Sql::$queryLikes = array() [protected]
KWebSearch_Indexer_Sql::$sqlQueries = array() [protected]
KWebSearch_Indexer_Sql::$sqlQuery = false [protected]
KWebSearch_Indexer_Sql::$useMatchAgainst = false

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