Nextcloud PHP API (master)

ISearchRequest

Interface ISearchRequest

When a search request is initiated, from a request from the front-end or using the IFullTextSearchManager::search() method, FullTextSearch will create a SearchRequest object, based on this interface.

The object will be passed to the targeted Content Provider so it can convert search options using available method.

The object is then encapsulated in a SearchResult and send to the Search Platform.

Tags
since
15.0.0

Table of Contents

Methods

addField()  : ISearchRequest
Add an extra field to the search.
addLimitField()  : ISearchRequest
Limit the search to a specific field of the mapping, using a full string.
addMetaTag()  : ISearchRequest
Limit the search to a specific meta tag.
addPart()  : ISearchRequest
Limit the search to a part of the document.
addRegexFilters()  : ISearchRequest
Filter the results, based on a group of field, using regex
addSearch()  : ISearchRequest
Extends the searched string.
addSimpleQuery()  : ISearchRequest
Add a MUST search on an extra field
addSubTag()  : ISearchRequest
Limit the search to a specific sub tag.
addWildcardField()  : ISearchRequest
Limit the search to a specific field of the mapping, using a wildcard on the search string.
addWildcardFilter()  : ISearchRequest
Filter the results, based on a group of field, using wildcard
getAuthor()  : string
Get the author of the request.
getFields()  : array<string|int, mixed>
Get the list of extra field to search into.
getLimitFields()  : array<string|int, mixed>
Get the fields the search is limited to.
getMetaTags()  : array<string|int, mixed>
Get the meta tags the search is limited to.
getOption()  : string
Get the value of an option (as string).
getOptionArray()  : array<string|int, mixed>
Get the value of an option (as array).
getPage()  : int
Get the current page.
getParts()  : array<string|int, mixed>
Get the parts the search is limited to.
getRegexFilters()  : array<string|int, mixed>
Get the regex filters the search is limit to.
getSearch()  : string
Get the searched string.
getSimpleQueries()  : array<string|int, ISearchRequestSimpleQuery>
Get the list of queries on extra field.
getSize()  : int
Get the maximum number of results to be returns by the Search Platform.
getSubTags()  : array<string|int, mixed>
Get the sub tags the search is limited to.
getWildcardFields()  : array<string|int, mixed>
Get the limit to field of the mapping.
getWildcardFilters()  : array<string|int, mixed>
Get the wildcard filters the search is limit to.
setMetaTags()  : ISearchRequest
Limit the search to an array of meta tags.
setParts()  : ISearchRequest
Limit the search to an array of parts of the document.
setSearch()  : ISearchRequest
Set the searched string.
setSubTags()  : ISearchRequest
Limit the search to an array of sub tags.

Methods

addLimitField()

Limit the search to a specific field of the mapping, using a full string.

public addLimitField(string $field) : ISearchRequest
Parameters
$field : string
Tags
since
15.0.0
Return values
ISearchRequest

addRegexFilters()

Filter the results, based on a group of field, using regex

public addRegexFilters(array<string|int, mixed> $filters) : ISearchRequest
Parameters
$filters : array<string|int, mixed>
Tags
since
15.0.0
Return values
ISearchRequest

addSubTag()

Limit the search to a specific sub tag.

public addSubTag(string $source, string $tag) : ISearchRequest
Parameters
$source : string
$tag : string
Tags
since
15.0.0
Return values
ISearchRequest

addWildcardField()

Limit the search to a specific field of the mapping, using a wildcard on the search string.

public addWildcardField(string $field) : ISearchRequest
Parameters
$field : string
Tags
since
15.0.0
Return values
ISearchRequest

addWildcardFilter()

Filter the results, based on a group of field, using wildcard

public addWildcardFilter(array<string|int, mixed> $filter) : ISearchRequest
Parameters
$filter : array<string|int, mixed>
Tags
since
15.0.0
Return values
ISearchRequest

getAuthor()

Get the author of the request.

public getAuthor() : string
Tags
since
15.0.0
Return values
string

getFields()

Get the list of extra field to search into.

public getFields() : array<string|int, mixed>
Tags
since
15.0.0
Return values
array<string|int, mixed>

getLimitFields()

Get the fields the search is limited to.

public getLimitFields() : array<string|int, mixed>
Tags
since
15.0.0
Return values
array<string|int, mixed>

getMetaTags()

Get the meta tags the search is limited to.

public getMetaTags() : array<string|int, mixed>
Tags
since
15.0.0
Return values
array<string|int, mixed>

getOption()

Get the value of an option (as string).

public getOption(string $option[, string $default = '' ]) : string
Parameters
$option : string
$default : string = ''
Tags
since
15.0.0
Return values
string

getOptionArray()

Get the value of an option (as array).

public getOptionArray(string $option[, array<string|int, mixed> $default = [] ]) : array<string|int, mixed>
Parameters
$option : string
$default : array<string|int, mixed> = []
Tags
since
15.0.0
Return values
array<string|int, mixed>

getPage()

Get the current page.

public getPage() : int

Used by pagination.

Tags
since
15.0.0
Return values
int

getParts()

Get the parts the search is limited to.

public getParts() : array<string|int, mixed>
Tags
since
15.0.0
Return values
array<string|int, mixed>

getRegexFilters()

Get the regex filters the search is limit to.

public getRegexFilters() : array<string|int, mixed>
Tags
since
15.0.0
Return values
array<string|int, mixed>

getSearch()

Get the searched string.

public getSearch() : string
Tags
since
15.0.0
Return values
string

getSize()

Get the maximum number of results to be returns by the Search Platform.

public getSize() : int
Tags
since
15.0.0
Return values
int

getSubTags()

Get the sub tags the search is limited to.

public getSubTags(bool $formatted) : array<string|int, mixed>
Parameters
$formatted : bool
Tags
since
15.0.0
Return values
array<string|int, mixed>

getWildcardFields()

Get the limit to field of the mapping.

public getWildcardFields() : array<string|int, mixed>
Tags
since
15.0.0
Return values
array<string|int, mixed>

getWildcardFilters()

Get the wildcard filters the search is limit to.

public getWildcardFilters() : array<string|int, mixed>
Tags
since
15.0.0
Return values
array<string|int, mixed>

setMetaTags()

Limit the search to an array of meta tags.

public setMetaTags(array<string|int, mixed> $tags) : ISearchRequest
Parameters
$tags : array<string|int, mixed>
Tags
since
15.0.0
Return values
ISearchRequest

setParts()

Limit the search to an array of parts of the document.

public setParts(array<string|int, mixed> $parts) : ISearchRequest
Parameters
$parts : array<string|int, mixed>
Tags
since
15.0.0
Return values
ISearchRequest

setSubTags()

Limit the search to an array of sub tags.

public setSubTags(array<string|int, mixed> $tags) : ISearchRequest
Parameters
$tags : array<string|int, mixed>
Tags
since
15.0.0
Return values
ISearchRequest

        
On this page

Search results