Nextcloud PHP API (stable19)

ISearchService

Interface ISearchService

Tags
since
15.0.0

Table of Contents

generateSearchRequest()  : ISearchRequest
generate a search request, based on an array:
search()  : \OCP\FullTextSearch\Model\ISearchResult[]
Search documents

Methods

generateSearchRequest()

generate a search request, based on an array:

public generateSearchRequest(array $request) : ISearchRequest

$request = [ 'providers' => (string/array) 'all' 'author' => (string) owner of the document. 'search' => (string) search string, 'size' => (int) number of items to be return 'page' => (int) page 'parts' => (array) parts of document to search within, 'options' = (array) search options, 'tags' => (array) tags, 'metatags' => (array) metatags, 'subtags' => (array) subtags ]

'providers' can be an array of providerIds

Parameters
$request : array
Tags
since
15.0.0
Return values
ISearchRequest

Search documents

public search(string $userId, ISearchRequest $searchRequest) : \OCP\FullTextSearch\Model\ISearchResult[]
Parameters
$userId : string
$searchRequest : ISearchRequest
Tags
since
15.0.0
Return values
\OCP\FullTextSearch\Model\ISearchResult[]

Search results