IFullTextSearchManager
Interface IFullTextSearchManager
Should be used to manage FullTextSearch from the app that contains your Content Provider/Search Platform.
Tags
Table of Contents
- addJavascriptAPI() : mixed
- Add the Javascript API in the navigation page of an app.
- createIndex() : IIndex
- Create a new Index.
- getIndex() : IIndex
- Retrieve an Index from the database, based on the Id of the Provider and the Id of the Document
- isAvailable() : bool
- returns true is Full Text Search is available (app is present and Service are registered)
- isProviderIndexed() : bool
- Check if the provider $providerId is already indexed.
- registerIndexService() : mixed
- Register a IIndexService.
- registerProviderService() : mixed
- Register a IProviderService.
- registerSearchService() : mixed
- Register a ISearchService.
- search() : \OCP\FullTextSearch\Model\ISearchResult[]
- Search using an array as request. If $userId is empty, will use the current session.
- updateIndexes() : mixed
- Update an array of Index.
- updateIndexesStatus() : mixed
- Update the status of an array of Index. status is a bit flag, setting $reset to true will reset the status to the value defined in the parameter.
- updateIndexStatus() : mixed
- Update the status of an Index. status is a bitflag, setting $reset to true will reset the status to the value defined in the parameter.
Methods
addJavascriptAPI()
Add the Javascript API in the navigation page of an app.
public
addJavascriptAPI() : mixed
Needed to replace the default search.
Tags
Return values
mixed —createIndex()
Create a new Index.
public
createIndex(string $providerId, string $documentId, string $userId, int $status) : IIndex
This method must be called when a new document is created.
Parameters
- $providerId : string
- $documentId : string
- $userId : string
- $status : int
Tags
Return values
IIndex —getIndex()
Retrieve an Index from the database, based on the Id of the Provider and the Id of the Document
public
getIndex(string $providerId, string $documentId) : IIndex
Parameters
- $providerId : string
- $documentId : string
Tags
Return values
IIndex —isAvailable()
returns true is Full Text Search is available (app is present and Service are registered)
public
isAvailable() : bool
Tags
Return values
bool —isProviderIndexed()
Check if the provider $providerId is already indexed.
public
isProviderIndexed(string $providerId) : bool
Parameters
- $providerId : string
Tags
Return values
bool —registerIndexService()
Register a IIndexService.
public
registerIndexService(IIndexService $indexService) : mixed
Parameters
- $indexService : IIndexService
Tags
Return values
mixed —registerProviderService()
Register a IProviderService.
public
registerProviderService(IProviderService $providerService) : mixed
Parameters
- $providerService : IProviderService
Tags
Return values
mixed —registerSearchService()
Register a ISearchService.
public
registerSearchService(ISearchService $searchService) : mixed
Parameters
- $searchService : ISearchService
Tags
Return values
mixed —search()
Search using an array as request. If $userId is empty, will use the current session.
public
search(array $request[, string $userId = '' ]) : \OCP\FullTextSearch\Model\ISearchResult[]
Parameters
- $request : array
- $userId : string = ''
Tags
Return values
\OCP\FullTextSearch\Model\ISearchResult[] —updateIndexes()
Update an array of Index.
public
updateIndexes(\OCP\FullTextSearch\Model\IIndex[] $indexes) : mixed
Parameters
- $indexes : \OCP\FullTextSearch\Model\IIndex[]
Tags
Return values
mixed —updateIndexesStatus()
Update the status of an array of Index. status is a bit flag, setting $reset to true will reset the status to the value defined in the parameter.
public
updateIndexesStatus(string $providerId, array $documentIds, int $status[, bool $reset = false ]) : mixed
Parameters
- $providerId : string
- $documentIds : array
- $status : int
- $reset : bool = false
Tags
Return values
mixed —updateIndexStatus()
Update the status of an Index. status is a bitflag, setting $reset to true will reset the status to the value defined in the parameter.
public
updateIndexStatus(string $providerId, string $documentId, int $status[, bool $reset = false ]) : mixed
Parameters
- $providerId : string
- $documentId : string
- $status : int
- $reset : bool = false