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
Table of Contents
- 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
- Get the list of extra field to search into.
- getLimitFields() : array
- Get the fields the search is limited to.
- getMetaTags() : array
- Get the meta tags the search is limited to.
- getOption() : string
- Get the value of an option (as string).
- getOptionArray() : array
- Get the value of an option (as array).
- getPage() : int
- Get the current page.
- getParts() : array
- Get the parts the search is limited to.
- getRegexFilters() : array
- Get the regex filters the search is limit to.
- getSearch() : string
- Get the searched string.
- getSimpleQueries() : \OCP\FullTextSearch\Model\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
- Get the sub tags the search is limited to.
- getWildcardFields() : array
- Get the limit to field of the mapping.
- getWildcardFilters() : array
- 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
addField()
Add an extra field to the search.
public
addField(string $field) : ISearchRequest
Parameters
- $field : string
Tags
Return values
ISearchRequest —addLimitField()
Limit the search to a specific field of the mapping, using a full string.
public
addLimitField(string $field) : ISearchRequest
Parameters
- $field : string
Tags
Return values
ISearchRequest —addMetaTag()
Limit the search to a specific meta tag.
public
addMetaTag(string $tag) : ISearchRequest
Parameters
- $tag : string
Tags
Return values
ISearchRequest —addPart()
Limit the search to a part of the document.
public
addPart(string $part) : ISearchRequest
Parameters
- $part : string
Tags
Return values
ISearchRequest —addRegexFilters()
Filter the results, based on a group of field, using regex
public
addRegexFilters(array $filters) : ISearchRequest
Parameters
- $filters : array
Tags
Return values
ISearchRequest —addSearch()
Extends the searched string.
public
addSearch(string $search) : ISearchRequest
Parameters
- $search : string
Tags
Return values
ISearchRequest —addSimpleQuery()
Add a MUST search on an extra field
public
addSimpleQuery(ISearchRequestSimpleQuery $query) : ISearchRequest
Parameters
- $query : ISearchRequestSimpleQuery
Tags
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
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
Return values
ISearchRequest —addWildcardFilter()
Filter the results, based on a group of field, using wildcard
public
addWildcardFilter(array $filter) : ISearchRequest
Parameters
- $filter : array
Tags
Return values
ISearchRequest —getAuthor()
Get the author of the request.
public
getAuthor() : string
Tags
Return values
string —getFields()
Get the list of extra field to search into.
public
getFields() : array
Tags
Return values
array —getLimitFields()
Get the fields the search is limited to.
public
getLimitFields() : array
Tags
Return values
array —getMetaTags()
Get the meta tags the search is limited to.
public
getMetaTags() : array
Tags
Return values
array —getOption()
Get the value of an option (as string).
public
getOption(string $option[, string $default = '' ]) : string
Parameters
- $option : string
- $default : string = ''
Tags
Return values
string —getOptionArray()
Get the value of an option (as array).
public
getOptionArray(string $option[, array $default = [] ]) : array
Parameters
- $option : string
- $default : array = []
Tags
Return values
array —getPage()
Get the current page.
public
getPage() : int
Used by pagination.
Tags
Return values
int —getParts()
Get the parts the search is limited to.
public
getParts() : array
Tags
Return values
array —getRegexFilters()
Get the regex filters the search is limit to.
public
getRegexFilters() : array
Tags
Return values
array —getSearch()
Get the searched string.
public
getSearch() : string
Tags
Return values
string —getSimpleQueries()
Get the list of queries on extra field.
public
getSimpleQueries() : \OCP\FullTextSearch\Model\ISearchRequestSimpleQuery[]
Tags
Return values
\OCP\FullTextSearch\Model\ISearchRequestSimpleQuery[] —getSize()
Get the maximum number of results to be returns by the Search Platform.
public
getSize() : int
Tags
Return values
int —getSubTags()
Get the sub tags the search is limited to.
public
getSubTags(bool $formatted) : array
Parameters
- $formatted : bool
Tags
Return values
array —getWildcardFields()
Get the limit to field of the mapping.
public
getWildcardFields() : array
Tags
Return values
array —getWildcardFilters()
Get the wildcard filters the search is limit to.
public
getWildcardFilters() : array
Tags
Return values
array —setMetaTags()
Limit the search to an array of meta tags.
public
setMetaTags(array $tags) : ISearchRequest
Parameters
- $tags : array
Tags
Return values
ISearchRequest —setParts()
Limit the search to an array of parts of the document.
public
setParts(array $parts) : ISearchRequest
Parameters
- $parts : array
Tags
Return values
ISearchRequest —setSearch()
Set the searched string.
public
setSearch(string $search) : ISearchRequest
Parameters
- $search : string
Tags
Return values
ISearchRequest —setSubTags()
Limit the search to an array of sub tags.
public
setSubTags(array $tags) : ISearchRequest
Parameters
- $tags : array