Nextcloud PHP API (master)

IIndex

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
since
15.0.0

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
since
15.0.0

ERROR_FAILED2

public mixed ERROR_FAILED2 = 2
Tags
since
15.0.0

ERROR_FAILED3

public mixed ERROR_FAILED3 = 4
Tags
since
15.0.0

ERROR_SEV_1

public mixed ERROR_SEV_1 = 1
Tags
since
15.0.0

ERROR_SEV_2

public mixed ERROR_SEV_2 = 2
Tags
since
15.0.0

ERROR_SEV_3

public mixed ERROR_SEV_3 = 3
Tags
since
15.0.0

ERROR_SEV_4

public mixed ERROR_SEV_4 = 4
Tags
since
15.0.0

INDEX_CONTENT

public mixed INDEX_CONTENT = 8
Tags
since
15.0.0

INDEX_DONE

public mixed INDEX_DONE = 64
Tags
since
15.0.0

INDEX_FAILED

public mixed INDEX_FAILED = 128
Tags
since
15.0.0

INDEX_FULL

public mixed INDEX_FULL = 28
Tags
since
15.0.0

INDEX_IGNORE

public mixed INDEX_IGNORE = 2
Tags
since
15.0.0

INDEX_META

public mixed INDEX_META = 4
Tags
since
15.0.0

INDEX_OK

public mixed INDEX_OK = 1
Tags
since
15.0.0

INDEX_PARTS

public mixed INDEX_PARTS = 16
Tags
since
16.0.0

INDEX_REMOVE

public mixed INDEX_REMOVE = 32
Tags
since
15.0.0

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
since
15.0.0
Return values
IIndex

addOption()

Add an option related to the original document (as string).

public addOption(string $option, string $value) : IIndex
Parameters
$option : string
$value : string
Tags
since
15.0.0
Return values
IIndex

addOptionInt()

Add an option related to the original document (as integer).

public addOptionInt(string $option, int $value) : IIndex
Parameters
$option : string
$value : int
Tags
since
15.0.0
Return values
IIndex

getCollection()

Get the collection of the index.

public getCollection() : string

If empty (''), means collection is the default one used by the internal framework

Tags
since
24.0.0
Return values
string

getDocumentId()

Get the Id of the original document.

public getDocumentId() : string
Tags
since
15.0.0
Return values
string

getErrorCount()

Returns the number of known errors related to the Index.

public getErrorCount() : int
Tags
since
15.0.0
Return values
int

getLastIndex()

Get the date of the last index.

public getLastIndex() : int
Tags
since
15.0.0
Return values
int

getOption()

Get the option related to the original document (as string).

public getOption(string $option[, string $default = '' ]) : string
Parameters
$option : string
$default : string = ''
Tags
since
15.0.0
Return values
string

getOptionInt()

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
since
15.0.0
Return values
int

getOptions()

Get all options related to the original document.

public getOptions() : array<string|int, mixed>
Tags
since
15.0.0
Return values
array<string|int, mixed>

getOwnerId()

Get the owner of the original document.

public getOwnerId() : string
Tags
since
15.0.0
Return values
string

getProviderId()

Get the Id of the Content Provider.

public getProviderId() : string
Tags
since
15.0.0
Return values
string

getSource()

Get the source of the original document.

public getSource() : string
Tags
since
15.0.0
Return values
string

getStatus()

Get the current index status of the original document.

public getStatus() : int
Tags
since
15.0.0
Return values
int

isStatus()

Check if the document fit a specific status.

public isStatus(int $status) : bool
Parameters
$status : int
Tags
since
15.0.0
Return values
bool

resetErrors()

Reset all error logs related to the Index.

public resetErrors() : IIndex
Tags
since
15.0.0
Return values
IIndex

setLastIndex()

Set the date of the last index.

public setLastIndex([int $lastIndex = -1 ]) : IIndex
Parameters
$lastIndex : int = -1
Tags
since
15.0.0
Return values
IIndex

setOwnerId()

Set the owner of the original document.

public setOwnerId(string $ownerId) : IIndex
Parameters
$ownerId : string
Tags
since
15.0.0
Return values
IIndex

setSource()

Set the source of the original document.

public setSource(string $source) : IIndex
Parameters
$source : string
Tags
since
15.0.0
Return values
IIndex

setStatus()

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
since
15.0.0
Return values
IIndex

unsetStatus()

Remove a status.

public unsetStatus(int $status) : IIndex
Parameters
$status : int
Tags
since
15.0.0
Return values
IIndex

        
On this page

Search results