IIndex

interface OCP\FullTextSearch\Model\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, ...
Source:lib/public/FullTextSearch/Model/IIndex.php#46

Methods

public OCP\FullTextSearch\Model\IIndex::getProviderId()
Get the Id of the Content Provider.
Source:lib/public/FullTextSearch/Model/IIndex.php#75
Since:15.0.0
Returns:string
public OCP\FullTextSearch\Model\IIndex::getDocumentId()
Get the Id of the original document.
Source:lib/public/FullTextSearch/Model/IIndex.php#85
Since:15.0.0
Returns:string
public OCP\FullTextSearch\Model\IIndex::setSource($source)
Set the source of the original document.
Source:

lib/public/FullTextSearch/Model/IIndex.php#97

Parameters:
  • $source (string)
Since:

15.0.0

Returns:

\OCP\FullTextSearch\Model\IIndex

public OCP\FullTextSearch\Model\IIndex::getSource()
Get the source of the original document.
Source:lib/public/FullTextSearch/Model/IIndex.php#106
Since:15.0.0
Returns:string
public OCP\FullTextSearch\Model\IIndex::setOwnerId($ownerId)
Set the owner of the original document.
Source:

lib/public/FullTextSearch/Model/IIndex.php#118

Parameters:
  • $ownerId (string)
Since:

15.0.0

Returns:

\OCP\FullTextSearch\Model\IIndex

public OCP\FullTextSearch\Model\IIndex::getOwnerId()
Get the owner of the original document.
Source:lib/public/FullTextSearch/Model/IIndex.php#127
Since:15.0.0
Returns:string
public OCP\FullTextSearch\Model\IIndex::setStatus($status, $reset=false)
Set the current index status (bit flag) of the original document.
If $reset is true, the status is reset to the defined value.
Source:

lib/public/FullTextSearch/Model/IIndex.php#141

Parameters:
  • $status (int)
  • $reset (bool)
Since:

15.0.0

Returns:

\OCP\FullTextSearch\Model\IIndex

public OCP\FullTextSearch\Model\IIndex::getStatus()
Get the current index status of the original document.
Source:lib/public/FullTextSearch/Model/IIndex.php#150
Since:15.0.0
Returns:int
public OCP\FullTextSearch\Model\IIndex::isStatus($status)
Check if the document fit a specific status.
Source:

lib/public/FullTextSearch/Model/IIndex.php#161

Parameters:
  • $status (int)
Since:

15.0.0

Returns:

bool

public OCP\FullTextSearch\Model\IIndex::unsetStatus($status)
Remove a status.
Source:

lib/public/FullTextSearch/Model/IIndex.php#172

Parameters:
  • $status (int)
Since:

15.0.0

Returns:

\OCP\FullTextSearch\Model\IIndex

public OCP\FullTextSearch\Model\IIndex::addOption($option, $value)
Add an option related to the original document (as string).
Source:

lib/public/FullTextSearch/Model/IIndex.php#185

Parameters:
  • $option (string)
  • $value (string)
Since:

15.0.0

Returns:

\OCP\FullTextSearch\Model\IIndex

public OCP\FullTextSearch\Model\IIndex::addOptionInt($option, $value)
Add an option related to the original document (as integer).
Source:

lib/public/FullTextSearch/Model/IIndex.php#197

Parameters:
  • $option (string)
  • $value (int)
Since:

15.0.0

Returns:

\OCP\FullTextSearch\Model\IIndex

public OCP\FullTextSearch\Model\IIndex::getOption($option, $default="")
Get the option related to the original document (as string).
Source:

lib/public/FullTextSearch/Model/IIndex.php#209

Parameters:
  • $option (string)
  • $default (string)
Since:

15.0.0

Returns:

string

public OCP\FullTextSearch\Model\IIndex::getOptionInt($option, $default=0)
Get the option related to the original document (as integer).
Source:

lib/public/FullTextSearch/Model/IIndex.php#221

Parameters:
  • $option (string)
  • $default (int)
Since:

15.0.0

Returns:

int

public OCP\FullTextSearch\Model\IIndex::getOptions()
Get all options related to the original document.
Source:lib/public/FullTextSearch/Model/IIndex.php#230
Since:15.0.0
Returns:array
public OCP\FullTextSearch\Model\IIndex::addError($message, $exception="", $sev=self::ERROR_SEV_3)
Add an error log related to the Index.
Source:

lib/public/FullTextSearch/Model/IIndex.php#244

Parameters:
  • $message (string)
  • $exception (string)
  • $sev (int)
Since:

15.0.0

Returns:

\OCP\FullTextSearch\Model\IIndex

public OCP\FullTextSearch\Model\IIndex::getErrorCount()
Returns the number of known errors related to the Index.
Source:lib/public/FullTextSearch/Model/IIndex.php#253
Since:15.0.0
Returns:int
public OCP\FullTextSearch\Model\IIndex::resetErrors()
Reset all error logs related to the Index.
Source:lib/public/FullTextSearch/Model/IIndex.php#260
Since:15.0.0
public OCP\FullTextSearch\Model\IIndex::setLastIndex($lastIndex=-1)
Set the date of the last index.
Source:

lib/public/FullTextSearch/Model/IIndex.php#272

Parameters:
  • $lastIndex (int)
Since:

15.0.0

Returns:

\OCP\FullTextSearch\Model\IIndex

public OCP\FullTextSearch\Model\IIndex::getLastIndex()
Get the date of the last index.
Source:lib/public/FullTextSearch/Model/IIndex.php#281
Since:15.0.0
Returns:int