Nextcloud PHP API (master)

IFullTextSearchManager

Interface IFullTextSearchManager

Should be used to manage FullTextSearch from the app that contains your Content Provider/Search Platform.

Tags
since
15.0.0

Table of Contents

Methods

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()  : array<string|int, 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
since
15.0.0

createIndex()

Create a new Index.

public createIndex(string $providerId, string $documentId, string $userId[, int $status = 0 ]) : IIndex

This method must be called when a new document is created.

Parameters
$providerId : string
$documentId : string
$userId : string
$status : int = 0
Tags
since
15.0.0
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
since
15.0.0
Return values
IIndex

isAvailable()

returns true is Full Text Search is available (app is present and Service are registered)

public isAvailable() : bool
Tags
since
16.0.0
Return values
bool

isProviderIndexed()

Check if the provider $providerId is already indexed.

public isProviderIndexed(string $providerId) : bool
Parameters
$providerId : string
Tags
since
15.0.0
Return values
bool

Search using an array as request. If $userId is empty, will use the current session.

public search(array<string|int, mixed> $request[, string $userId = '' ]) : array<string|int, ISearchResult>
Parameters
$request : array<string|int, mixed>
$userId : string = ''
Tags
see
ISearchService::generateSearchRequest
since
15.0.0
Return values
array<string|int, ISearchResult>

updateIndexes()

Update an array of Index.

public updateIndexes(array<string|int, IIndex$indexes) : mixed
Parameters
$indexes : array<string|int, IIndex>
Tags
since
15.0.0

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<string|int, mixed> $documentIds, int $status[, bool $reset = false ]) : mixed
Parameters
$providerId : string
$documentIds : array<string|int, mixed>
$status : int
$reset : bool = false
Tags
since
15.0.0

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

        
On this page

Search results