IIndex
in
Interface IIndex
Index are generated by FullTextSearch to manage the status of a document regarding the date of the last index and the date of the last modification of the original document.
The uniqueness of an IIndexDocument is made by the Id of the Content Provider and the Id of the original document within the Content Provider.
We will call original document the source from which the IIndexDocument is generated. As an example, an original document can be a file, a mail, ...
Tags
Table of Contents
Constants
- ERROR_FAILED = 1
- ERROR_FAILED2 = 2
- ERROR_FAILED3 = 4
- ERROR_SEV_1 = 1
- ERROR_SEV_2 = 2
- ERROR_SEV_3 = 3
- ERROR_SEV_4 = 4
- INDEX_CONTENT = 8
- INDEX_DONE = 64
- INDEX_FAILED = 128
- INDEX_FULL = 28
- INDEX_IGNORE = 2
- INDEX_META = 4
- INDEX_OK = 1
- INDEX_PARTS = 16
- INDEX_REMOVE = 32
Methods
- addError() : IIndex
- Add an error log related to the Index.
- addOption() : IIndex
- Add an option related to the original document (as string).
- addOptionInt() : IIndex
- Add an option related to the original document (as integer).
- getCollection() : string
- Get the collection of the index.
- getDocumentId() : string
- Get the Id of the original document.
- getErrorCount() : int
- Returns the number of known errors related to the Index.
- getLastIndex() : int
- Get the date of the last index.
- getOption() : string
- Get the option related to the original document (as string).
- getOptionInt() : int
- Get the option related to the original document (as integer).
- getOptions() : array<string|int, mixed>
- Get all options related to the original document.
- getOwnerId() : string
- Get the owner of the original document.
- getProviderId() : string
- Get the Id of the Content Provider.
- getSource() : string
- Get the source of the original document.
- getStatus() : int
- Get the current index status of the original document.
- isStatus() : bool
- Check if the document fit a specific status.
- resetErrors() : IIndex
- Reset all error logs related to the Index.
- setLastIndex() : IIndex
- Set the date of the last index.
- setOwnerId() : IIndex
- Set the owner of the original document.
- setSource() : IIndex
- Set the source of the original document.
- setStatus() : IIndex
- Set the current index status (bit flag) of the original document.
- unsetStatus() : IIndex
- Remove a status.
Constants
ERROR_FAILED
public
mixed
ERROR_FAILED
= 1
Tags
ERROR_FAILED2
public
mixed
ERROR_FAILED2
= 2
Tags
ERROR_FAILED3
public
mixed
ERROR_FAILED3
= 4
Tags
ERROR_SEV_1
public
mixed
ERROR_SEV_1
= 1
Tags
ERROR_SEV_2
public
mixed
ERROR_SEV_2
= 2
Tags
ERROR_SEV_3
public
mixed
ERROR_SEV_3
= 3
Tags
ERROR_SEV_4
public
mixed
ERROR_SEV_4
= 4
Tags
INDEX_CONTENT
public
mixed
INDEX_CONTENT
= 8
Tags
INDEX_DONE
public
mixed
INDEX_DONE
= 64
Tags
INDEX_FAILED
public
mixed
INDEX_FAILED
= 128
Tags
INDEX_FULL
public
mixed
INDEX_FULL
= 28
Tags
INDEX_IGNORE
public
mixed
INDEX_IGNORE
= 2
Tags
INDEX_META
public
mixed
INDEX_META
= 4
Tags
INDEX_OK
public
mixed
INDEX_OK
= 1
Tags
INDEX_PARTS
public
mixed
INDEX_PARTS
= 16
Tags
INDEX_REMOVE
public
mixed
INDEX_REMOVE
= 32
Tags
Methods
addError()
Add an error log related to the Index.
public
addError(string $message[, string $exception = '' ][, int $sev = self::ERROR_SEV_3 ]) : IIndex
Parameters
- $message : string
- $exception : string = ''
- $sev : int = self::ERROR_SEV_3
Tags
Return values
IIndexaddOption()
Add an option related to the original document (as string).
public
addOption(string $option, string $value) : IIndex
Parameters
- $option : string
- $value : string
Tags
Return values
IIndexaddOptionInt()
Add an option related to the original document (as integer).
public
addOptionInt(string $option, int $value) : IIndex
Parameters
- $option : string
- $value : int
Tags
Return values
IIndexgetCollection()
Get the collection of the index.
public
getCollection() : string
If empty (''), means collection is the default one used by the internal framework
Tags
Return values
stringgetDocumentId()
Get the Id of the original document.
public
getDocumentId() : string
Tags
Return values
stringgetErrorCount()
Returns the number of known errors related to the Index.
public
getErrorCount() : int
Tags
Return values
intgetLastIndex()
Get the date of the last index.
public
getLastIndex() : int
Tags
Return values
intgetOption()
Get the option related to the original document (as string).
public
getOption(string $option[, string $default = '' ]) : string
Parameters
- $option : string
- $default : string = ''
Tags
Return values
stringgetOptionInt()
Get the option related to the original document (as integer).
public
getOptionInt(string $option[, int $default = 0 ]) : int
Parameters
- $option : string
- $default : int = 0
Tags
Return values
intgetOptions()
Get all options related to the original document.
public
getOptions() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>getOwnerId()
Get the owner of the original document.
public
getOwnerId() : string
Tags
Return values
stringgetProviderId()
Get the Id of the Content Provider.
public
getProviderId() : string
Tags
Return values
stringgetSource()
Get the source of the original document.
public
getSource() : string
Tags
Return values
stringgetStatus()
Get the current index status of the original document.
public
getStatus() : int
Tags
Return values
intisStatus()
Check if the document fit a specific status.
public
isStatus(int $status) : bool
Parameters
- $status : int
Tags
Return values
boolresetErrors()
Reset all error logs related to the Index.
public
resetErrors() : IIndex
Tags
Return values
IIndexsetLastIndex()
Set the date of the last index.
public
setLastIndex([int $lastIndex = -1 ]) : IIndex
Parameters
- $lastIndex : int = -1
Tags
Return values
IIndexsetOwnerId()
Set the owner of the original document.
public
setOwnerId(string $ownerId) : IIndex
Parameters
- $ownerId : string
Tags
Return values
IIndexsetSource()
Set the source of the original document.
public
setSource(string $source) : IIndex
Parameters
- $source : string
Tags
Return values
IIndexsetStatus()
Set the current index status (bit flag) of the original document.
public
setStatus(int $status[, bool $reset = false ]) : IIndex
If $reset is true, the status is reset to the defined value.
Parameters
- $status : int
- $reset : bool = false
Tags
Return values
IIndexunsetStatus()
Remove a status.
public
unsetStatus(int $status) : IIndex
Parameters
- $status : int