Indexer
Table of Contents
Methods
- __construct() : mixed
- continueIndex() : int
- Does index step. Returns number of indexed elements.
- deleteElement() : void
- Removes element from the index.
- endIndex() : bool
- End of index creation. Marks iblock as indexed.
- estimateElementCount() : int
- Returns number of elements to be indexed.
- getLastElementId() : int|null
- Returns index mark/cursor. Last indexed element or null if there was none.
- getPropertyStorageType() : int
- Returns storage type for the property.
- indexElement() : void
- Indexes one element.
- init() : void
- Initializes internal object state. Must be called before usage.
- isExists() : bool
- Checks if storage and dictionary exists in the database.
- setLastElementId() : void
- Sets index mark/cursor.
- startIndex() : bool
- Drops and recreates the index. So one can start indexing.
Methods
__construct()
public
__construct(int $iblockId) : mixed
Parameters
- $iblockId : int
-
Information block identifier.
continueIndex()
Does index step. Returns number of indexed elements.
public
continueIndex([int $interval = 0 ]) : int
Parameters
- $interval : int = 0
-
Time limit for execution.
Return values
intdeleteElement()
Removes element from the index.
public
deleteElement(int $elementId) : void
Parameters
- $elementId : int
-
Element identifier.
endIndex()
End of index creation. Marks iblock as indexed.
public
endIndex() : bool
Return values
boolestimateElementCount()
Returns number of elements to be indexed.
public
estimateElementCount() : int
Return values
intgetLastElementId()
Returns index mark/cursor. Last indexed element or null if there was none.
public
getLastElementId() : int|null
Return values
int|nullgetPropertyStorageType()
Returns storage type for the property.
public
static getPropertyStorageType(mixed $property) : int
- N - maps to Indexer::NUMERIC
- S - to Indexer::STRING
- F, E, G, L - to Indexer::DICTIONARY
Parameters
- $property : mixed
-
Property description.
Return values
intindexElement()
Indexes one element.
public
indexElement(int $elementId) : void
Parameters
- $elementId : int
-
Element identifier.
init()
Initializes internal object state. Must be called before usage.
public
init() : void
Tags
isExists()
Checks if storage and dictionary exists in the database.
public
isExists() : bool
Returns true on success.
Return values
boolsetLastElementId()
Sets index mark/cursor.
public
setLastElementId(int $lastElementId) : void
Parameters
- $lastElementId : int
-
Element identifier.
startIndex()
Drops and recreates the index. So one can start indexing.
public
startIndex() : bool