KWeb  6.4
KWebSearch_Indexer Class Reference

Searching indexer base class Indexers are singleton objects used to handle creation of index (for content indexers), preparation of SQL queries (for sql indexers), and execution of a query. More...

Inheritance diagram for KWebSearch_Indexer:
KWebSearch_Indexer_Content KWebSearch_Indexer_Sql KWebSearch_Indexer_Lucene

Public Member Functions

 searchInitialize (KWebSearch $search)
 Called in constructor of KWebSearch that will be using this indexer.
 searchRun (KWebSearch $search)
 Runs the search query and returns the result.
 searchFinish ()
 parseResultItem ($resultItem)
 Returns result item as a KWebSearch_ResultItem.
 rebuildIndex ()
 optimizeIndex ()
 expandQuery (KWebSearch $search)

Static Public Member Functions

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

Data Fields

const OPT_CONTENTS = "contents"
const OPT_CONTENT_GENRE = "genre"
const OPT_CONTENT_ADAPTEROPTS = "adapterOptions"
const REFRESH_FROM_DEFINITION = 'from_definition'
const REFRESH_FROM_OFFSET = 'from_offset'
const GENRE = 'search_indexer'
 $id
 $options
 $wildcardChar = "*"

Static Public Attributes

static $instances = array()

Protected Member Functions

 __construct ($id)

Protected Attributes

 $search = null

Detailed Description

Searching indexer base class Indexers are singleton objects used to handle creation of index (for content indexers), preparation of SQL queries (for sql indexers), and execution of a query.


Constructor & Destructor Documentation

KWebSearch_Indexer::__construct ( id) [protected]

Member Function Documentation

KWebSearch_Indexer::expandQuery ( KWebSearch search)
static KWebSearch_Indexer::instance ( id,
create = true 
) [static]

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

sql, content)

Returns:
KWebSearch_Indexer

Reimplemented in KWebSearch_Indexer_Sql, KWebSearch_Indexer_Lucene, and KWebSearch_Indexer_Content.

KWebSearch_Indexer::optimizeIndex ( )

Reimplemented in KWebSearch_Indexer_Lucene.

KWebSearch_Indexer::parseResultItem ( resultItem)

Returns result item as a KWebSearch_ResultItem.

Returns:
KWebSearch_ResultItem
KWebSearch_Indexer::rebuildIndex ( )
KWebSearch_Indexer::searchFinish ( )

Reimplemented in KWebSearch_Indexer_Sql.

KWebSearch_Indexer::searchInitialize ( KWebSearch search)

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

Parameters:
$searchKWebSearch

Reimplemented in KWebSearch_Indexer_Sql.

KWebSearch_Indexer::searchRun ( KWebSearch search) [abstract]

Runs the search query and returns the result.

Returns:
KWebCollection_Objects

Reimplemented in KWebSearch_Indexer_Lucene, and KWebSearch_Indexer_Sql.


Field Documentation

KWebSearch_Indexer::$id
KWebSearch_Indexer::$instances = array() [static]
KWebSearch_Indexer::$options
KWebSearch_Indexer::$search = null [protected]
KWebSearch_Indexer::$wildcardChar = "*"
const KWebSearch_Indexer::GENRE = 'search_indexer'

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