IFullTextSearchPlatform¶
-
interface
OCP\FullTextSearch\
IFullTextSearchPlatform
¶ - Interface IFullTextSearchPlatformThis interface must be use when creating a Search Platform for FullTextSearch.A Search Platform is an extension to the FullTextSearch that will act as aa gateway between FullTextSearch and a search server (ie. ElasticSearch,Solr, ...)Multiple Search Platform can exist at the same time in Nextcloud, however onlyone Search Platform will be used by FullTextSearch.Administrator must select at least one Search Platform to be used byFullTextSearch in the admin settings page.The content provided by FullTextSearch comes in chunk from multiple ContentProvider. Each chunk is identified by the ID of the Content Provider, and theID of the document.To oversimplify the mechanism:- When indexing, FullTextSearch will send providerId, documentId, content.- When searching within the content of a Content Provider, identified by itsproviderId, FullTextSearch expect documentId as result.The Search Platform ia a PHP class that implement this interface and is definedin appinfo/info.xml of the app that contains that class:<fulltextsearch><platform>OCA\YourApp\YourSearchPlatform</platform></fulltextsearch>Multiple Search Platform can be defined in a single app.
Source: lib/public/FullTextSearch/IFullTextSearchPlatform.php#73
Methods¶
-
public
OCP\FullTextSearch\IFullTextSearchPlatform::
getId
()¶ - Must returns a unique Id used to identify the Search Platform.Id must contains only alphanumeric chars, with no space.
Source: lib/public/FullTextSearch/IFullTextSearchPlatform.php#84 Since: 15.0.0 Returns: string
-
public
OCP\FullTextSearch\IFullTextSearchPlatform::
getName
()¶ - Must returns a descriptive name of the Search Platform.This is used mainly in the admin settings page to display the list ofavailable Search Platform
Source: lib/public/FullTextSearch/IFullTextSearchPlatform.php#96 Since: 15.0.0 Returns: string
-
public
OCP\FullTextSearch\IFullTextSearchPlatform::
getConfiguration
()¶ - should returns the current configuration of the Search Platform.This is used to display the configuration when using the./occ fulltextsearch:check command line.
Source: lib/public/FullTextSearch/IFullTextSearchPlatform.php#108 Since: 15.0.0 Returns: array
-
public
OCP\FullTextSearch\IFullTextSearchPlatform::
setRunner
($runner)¶ - Set the wrapper of the currently executed process.Because the index process can be long and heavy, and because errors canbe encountered during the process, the IRunner is a wrapper that allow theSearch Platform to communicate with the process initiated byFullTextSearch.The IRunner is coming with some methods so the Search Platform canreturns important information and errors to be displayed to the admin.
Source: Parameters: - $runner (
OCP\FullTextSearch\Model\IRunner
)
Since: 15.0.0
- $runner (
-
public
OCP\FullTextSearch\IFullTextSearchPlatform::
loadPlatform
()¶ - Called when FullTextSearch is loading your Search Platform.
Source: lib/public/FullTextSearch/IFullTextSearchPlatform.php#133 Since: 15.0.0
-
public
OCP\FullTextSearch\IFullTextSearchPlatform::
testPlatform
()¶ - Called to check that your Search Platform is correctly configured and thatThis is also the right place to check that the Search Service is available.
Source: lib/public/FullTextSearch/IFullTextSearchPlatform.php#144 Since: 15.0.0 Returns: bool
-
public
OCP\FullTextSearch\IFullTextSearchPlatform::
initializeIndex
()¶ - Called before an index is initiated.Best place to initiate some stuff on the Search Server (mapping, ...)
Source: lib/public/FullTextSearch/IFullTextSearchPlatform.php#153 Since: 15.0.0
-
public
OCP\FullTextSearch\IFullTextSearchPlatform::
resetIndex
($providerId)¶ - Reset the indexes for a specific providerId.$providerId can be ‘all’ if it is a global reset.
Source: Parameters: - $providerId (string)
Since: 15.0.0
-
public
OCP\FullTextSearch\IFullTextSearchPlatform::
deleteIndexes
($indexes)¶ - Deleting some IIndex, sent in an array
Source: Parameters: - $indexes (
OCP\FullTextSearch\Model\IIndex[]
)
See: Since: 15.0.0
- $indexes (
-
public
OCP\FullTextSearch\IFullTextSearchPlatform::
indexDocument
($document)¶ - Indexing a document.
Source: Parameters: - $document (
OCP\FullTextSearch\Model\IIndexDocument
)
See: \OCP\FullTextSearch\IndexDocument
Since: 15.0.0
Returns: - $document (
-
public
OCP\FullTextSearch\IFullTextSearchPlatform::
searchRequest
($result, $access)¶ - Searching documents, ISearchResult should be updated with the result ofthe search.
Source: Parameters: - $result (
OCP\FullTextSearch\Model\ISearchResult
) - $access (
OCP\FullTextSearch\Model\IDocumentAccess
)
Since: 15.0.0
- $result (
-
public
OCP\FullTextSearch\IFullTextSearchPlatform::
getDocument
($providerId, $documentId)¶ - Return a document based on its Id and the Provider.This is used when an admin execute ./occ fulltextsearch:document:platform
Source: Parameters: - $providerId (string)
- $documentId (string)
Since: 15.0.0
Returns: