[ Index ]

PHP Cross Reference of Joomla 2.5.4 DE

title

Body

[close]

/administrator/components/com_finder/helpers/indexer/ -> indexer.php (summary)

(no description)

Copyright: Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
License: GNU General Public License version 2 or later; see LICENSE
File Size: 1336 lines (40 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

FinderIndexer:: (10 methods):
  getState()
  setState()
  resetState()
  index()
  remove()
  optimize()
  getSignature()
  tokenizeToDB()
  addTokensToDB()
  toggleTables()


Class: FinderIndexer  - X-Ref

Main indexer class for the Finder indexer package.

The indexer class provides the core functionality of the Finder
search engine. It is responsible for adding and updating the
content links table; extracting and scoring tokens; and maintaining
all referential information for the content.

Note: All exceptions thrown from within this class should be caught
by the controller.

getState()   X-Ref
Method to get the indexer state.

return: object  The indexer state object.

setState($data)   X-Ref
Method to set the indexer state.

param: object  $data  A new indexer state object.
return: boolean  True on success, false on failure.

resetState()   X-Ref
Method to reset the indexer state.

return: void

index($item, $format = 'html')   X-Ref
Method to index a content item.

param: FinderIndexerResult  $item    The content item to index.
param: string               $format  The format of the content. [optional]
return: integer  The ID of the record in the links table.

remove($linkId)   X-Ref
Method to remove a link from the index.

param: integer  $linkId  The id of the link.
return: boolean  True on success.

optimize()   X-Ref
Method to optimize the index. We use this method to remove unused terms
and any other optimizations that might be necessary.

return: boolean  True on success.

getSignature($item)   X-Ref
Method to get a content item's signature.

param: object  $item  The content item to index.
return: string  The content item's signature.

tokenizeToDB($input, $context, $lang, $format)   X-Ref
Method to parse input, tokenize it, and then add it to the database.

param: mixed    $input    String or resource to use as input. A resource
param: integer  $context  The context of the input. See context constants.
param: string   $lang     The language of the input.
param: string   $format   The format of the input.
return: integer  The number of tokens extracted from the input.

addTokensToDB($tokens, $context = '')   X-Ref
Method to add a set of tokens to the database.

param: mixed  $tokens   An array or single FinderIndexerToken object.
param: mixed  $context  The context of the tokens. See context constants. [optional]
return: integer  The number of tokens inserted into the database.

toggleTables($memory)   X-Ref
Method to switch the token tables from Memory tables to MyISAM tables
when they are close to running out of memory.

param: boolean  $memory  Flag to control how they should be toggled.
return: boolean  True on success.



Generated: Tue Apr 3 11:40:28 2012 Cross-referenced by PHPXref 0.7.1