Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

Static Public Member Functions | List of all members
eZSearch Class Reference

eZSearch handles indexing of objects to the search engine More...

## Static Public Member Functions
static | needCommit ()
static | needRemoveWithUpdate ()
static | removeObject ( $contentObject, $commit=null)
static | removeObjectById ( $contentObjectId, $commit=null)
static | addObject ( $contentObject, $commit=true)
static | search ( $searchText, $params, $searchTypes=array())
static | normalizeText ( $text)
static | buildSearchArray ()
static | cleanup ()
static | getEngine ()
static | updateObjectsSection (array $objectIDs, $sectionID)
static | updateNodeSection ( $nodeID, $sectionID)
static | updateNodeVisibility ( $nodeID, $action)
static | addNodeAssignment ( $mainNodeID, $objectID, $nodeAssignmentIDList, $isMoved=false)
static | removeNodeAssignment ( $mainNodeID, $newMainNodeID, $objectID, $nodeAssigmentIDList)
static | removeNodes (array $nodeIdList)
static | updateObjectState ( $objectID, $objectStateList)
static | swapNode ( $nodeID, $selectedNodeID, $nodeIdList=array())

## Detailed Description

eZSearch handles indexing of objects to the search engine

Definition at line 18 of file ezsearch.php.

## Member Function Documentation

## ◆ addNodeAssignment()

static eZSearch::addNodeAssignment | ( |  | $mainNodeID,
|  |  | $objectID,
|  |  | $nodeAssignmentIDList,
|  |  | $isMoved = `false`
| ) |  |
| static

Notifies search engine about new node assignments added

Since
  4.1

Parameters

  int | $mainNodeID |
  int | $objectID |
  array | $nodeAssignmentIDList |
  bool | $isMoved | true if node is being moved

Returns
  false|mixed False in case method is undefined, otherwise return the result of the search engine call

Definition at line 564 of file ezsearch.php.

References getEngine().

Referenced by eZContentObjectTreeNodeOperations\move().

## ◆ addObject()

static eZSearch::addObject | ( |  | $contentObject,
|  |  | $commit = `true`
| ) |  |
| static

Adds object $contentObject to the search database.

Parameters

  eZContentObject | $contentObject | Object to add to search engine
  bool | $commit | Whether to commit after adding the object

Returns
  bool True if the operation succeed.

Definition at line 98 of file ezsearch.php.

References getEngine().

Referenced by eZContentObjectTreeNode\removeNodeFromTree().

## ◆ buildSearchArray()

static eZSearch::buildSearchArray | ( |  | ) |
| static

returns search parameters in array based on supported search types and post variables

Definition at line 143 of file ezsearch.php.

References getEngine(), eZHTTPTool\instance(), and eZDebugSetting\writeDebug().

## ◆ cleanup()

static eZSearch::cleanup | ( |  | ) |
| static

Tells the current search engine to cleanup up all data.

Definition at line 432 of file ezsearch.php.

References getEngine().

## ◆ getEngine()

static eZSearch::getEngine | ( |  | ) |
| static

Get object instance of eZSearch engine to use.

Returns
  \ezpSearchEngine|bool Returns false (+ writes debug) if no engine was found

Definition at line 447 of file ezsearch.php.

References eZExtension\expandedPathList(), eZDebugSetting\writeDebug(), and eZDebug\writeDebug().

Referenced by addNodeAssignment(), addObject(), buildSearchArray(), cleanup(), needCommit(), needRemoveWithUpdate(), normalizeText(), removeNodeAssignment(), removeNodes(), removeObject(), removeObjectById(), search(), swapNode(), updateNodeSection(), updateNodeVisibility(), updateObjectsSection(), and updateObjectState().

## ◆ needCommit()

static eZSearch::needCommit | ( |  | ) |
| static

determine how to pass the commit argument, for deletes and updates maybe this needs to be further splitted

Definition at line 26 of file ezsearch.php.

References getEngine().

## ◆ needRemoveWithUpdate()

static eZSearch::needRemoveWithUpdate | ( |  | ) |
| static

See if a remove is needed in an update of content objects

Definition at line 41 of file ezsearch.php.

References getEngine().

## ◆ normalizeText()

static eZSearch::normalizeText | ( |  | $text | ) |
| static

Definition at line 127 of file ezsearch.php.

References getEngine().

## ◆ removeNodeAssignment()

static eZSearch::removeNodeAssignment | ( |  | $mainNodeID,
|  |  | $newMainNodeID,
|  |  | $objectID,
|  |  | $nodeAssigmentIDList
| ) |  |
| static

Notifies search engine about removed node assignments and what the new main node is (same if not changed)

Since
  4.1

Parameters

  int | $mainNodeID |
  int | $newMainNodeID |
  int | $objectID |
  array | $nodeAssigmentIDList |

Returns
  false|mixed False in case method is undefined, otherwise return the result of the search engine call

Definition at line 586 of file ezsearch.php.

References getEngine().

Referenced by eZContentObjectTreeNodeOperations\move().

## ◆ removeNodes()

static eZSearch::removeNodes | ( | array | $nodeIdList | ) |
| static

Notifies search engine about nodes being removed

Since
  4.1

Parameters

  array | $nodeIdList | Array of node ID to remove.

Returns
  false|mixed False in case method is undefined, otherwise return the result of the search engine call

Definition at line 605 of file ezsearch.php.

References getEngine().

## ◆ removeObject()

static eZSearch::removeObject | ( |  | $contentObject,
|  |  | $commit = `null`
| ) |  |
| static

Removes object $contentObject from the search database.

Deprecated:
  Since 5.0, use removeObjectById()

Parameters

  eZContentObject | $contentObject | the content object to remove
  bool | $commit | Whether to commit after removing the object

Returns
  bool True if the operation succeed.

Definition at line 60 of file ezsearch.php.

References getEngine().

## ◆ removeObjectById()

static eZSearch::removeObjectById | ( |  | $contentObjectId,
|  |  | $commit = `null`
| ) |  |
| static

Removes a content object by Id from the search database.

Since
  5.0

Parameters

  int | $contentObjectId | the content object to remove by id
  bool | $commit | Whether to commit after removing the object

Returns
  bool True if the operation succeed.

Definition at line 80 of file ezsearch.php.

References getEngine().

Referenced by eZContentObject\purge(), and eZContentObject\removeThis().

## ◆ search()

static eZSearch::search | ( |  | $searchText,
|  |  | $params,
|  |  | $searchTypes = `array()`
| ) |  |
| static

Runs a query to the search engine.

Definition at line 114 of file ezsearch.php.

References getEngine().

## ◆ swapNode()

static eZSearch::swapNode | ( |  | $nodeID,
|  |  | $selectedNodeID,
|  |  | $nodeIdList = `array()`
| ) |  |
| static

Notifies search engine about an swap node operation

Since
  4.1

Parameters

  int | $nodeID |
  int | $selectedNodeID |
  array | $nodeIdList |

Returns
  false|mixed False in case method is undefined, otherwise return the result of the search engine call

Definition at line 646 of file ezsearch.php.

References getEngine().

## ◆ updateNodeSection()

static eZSearch::updateNodeSection | ( |  | $nodeID,
|  |  | $sectionID
| ) |  |
| static

Notifies search engine about section changes

Since
  4.1

Parameters

  int | $nodeID |
  int | $sectionID |

Returns
  false|mixed False in case method is undefined, otherwise return the result of the search engine call

Definition at line 522 of file ezsearch.php.

References getEngine().

## ◆ updateNodeVisibility()

static eZSearch::updateNodeVisibility | ( |  | $nodeID,
|  |  | $action
| ) |  |
| static

Notifies search engine about node visibility changes

Since
  4.1

Parameters

  int | $nodeID |
  string | $action | "hide" or "show"

Returns
  false|mixed False in case method is undefined, otherwise return the result of the search engine call

Definition at line 542 of file ezsearch.php.

References getEngine().

## ◆ updateObjectsSection()

static eZSearch::updateObjectsSection | ( | array | $objectIDs,
|  |  | $sectionID
| ) |  |
| static

Notifies search engine about the change of section of a set of objects

Since
  4.6

Parameters

  array | $objectIDs |
  int | $sectionID |

Returns
  false|mixed false in case method is undefined, otherwise return the result of the search engine call

Definition at line 504 of file ezsearch.php.

References getEngine().

Referenced by eZSection\applyTo(), and eZContentObjectTreeNode\assignSectionToSubTree().

## ◆ updateObjectState()

static eZSearch::updateObjectState | ( |  | $objectID,
|  |  | $objectStateList
| ) |  |
| static

Notifies search engine about updates to object states

Since
  4.1

Parameters

  int | $objectID |
  array | $objectStateList |

Returns
  false|mixed False in case method is undefined, otherwise return the result of the search engine call

Definition at line 625 of file ezsearch.php.

References getEngine().

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

- ezsearch.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.