ISearchRequest

interface OCP\FullTextSearch\Model\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.
Source:lib/public/FullTextSearch/Model/ISearchRequest.php#46

Methods

public OCP\FullTextSearch\Model\ISearchRequest::getSize()
Get the maximum number of results to be returns by the Search Platform.
Source:lib/public/FullTextSearch/Model/ISearchRequest.php#56
Since:15.0.0
Returns:int
public OCP\FullTextSearch\Model\ISearchRequest::getPage()
Get the current page.
Used by pagination.
Source:lib/public/FullTextSearch/Model/ISearchRequest.php#67
Since:15.0.0
Returns:int
public OCP\FullTextSearch\Model\ISearchRequest::getAuthor()
Get the author of the request.
Source:lib/public/FullTextSearch/Model/ISearchRequest.php#77
Since:15.0.0
Returns:string
public OCP\FullTextSearch\Model\ISearchRequest::getSearch()
Get the searched string.
Source:lib/public/FullTextSearch/Model/ISearchRequest.php#86
Since:15.0.0
Returns:string
public OCP\FullTextSearch\Model\ISearchRequest::setSearch($search)
Set the searched string.
Source:

lib/public/FullTextSearch/Model/ISearchRequest.php#97

Parameters:
  • $search (string)
Since:

17.0.0

Returns:

\OCP\FullTextSearch\Model\ISearchRequest

public OCP\FullTextSearch\Model\ISearchRequest::addSearch($search)
Extends the searched string.
Source:

lib/public/FullTextSearch/Model/ISearchRequest.php#108

Parameters:
  • $search (string)
Since:

17.0.0

Returns:

\OCP\FullTextSearch\Model\ISearchRequest

public OCP\FullTextSearch\Model\ISearchRequest::getOption($option, $default="")
Get the value of an option (as string).
Source:

lib/public/FullTextSearch/Model/ISearchRequest.php#121

Parameters:
  • $option (string)
  • $default (string)
Since:

15.0.0

Returns:

string

public OCP\FullTextSearch\Model\ISearchRequest::getOptionArray($option, $default=[])
Get the value of an option (as array).
Source:

lib/public/FullTextSearch/Model/ISearchRequest.php#133

Parameters:
  • $option (string)
  • $default (array)
Since:

15.0.0

Returns:

array

public OCP\FullTextSearch\Model\ISearchRequest::addPart($part)
Limit the search to a part of the document.
Source:

lib/public/FullTextSearch/Model/ISearchRequest.php#145

Parameters:
  • $part (string)
Since:

15.0.0

Returns:

\OCP\FullTextSearch\Model\ISearchRequest

public OCP\FullTextSearch\Model\ISearchRequest::setParts($parts)
Limit the search to an array of parts of the document.
Source:

lib/public/FullTextSearch/Model/ISearchRequest.php#156

Parameters:
  • $parts (array)
Since:

15.0.0

Returns:

\OCP\FullTextSearch\Model\ISearchRequest

public OCP\FullTextSearch\Model\ISearchRequest::getParts()
Get the parts the search is limited to.
Source:lib/public/FullTextSearch/Model/ISearchRequest.php#165
Since:15.0.0
Returns:array
public OCP\FullTextSearch\Model\ISearchRequest::addMetaTag($tag)
Limit the search to a specific meta tag.
Source:

lib/public/FullTextSearch/Model/ISearchRequest.php#177

Parameters:
  • $tag (string)
Since:

15.0.0

Returns:

\OCP\FullTextSearch\Model\ISearchRequest

public OCP\FullTextSearch\Model\ISearchRequest::getMetaTags()
Get the meta tags the search is limited to.
Source:lib/public/FullTextSearch/Model/ISearchRequest.php#186
Since:15.0.0
Returns:array
public OCP\FullTextSearch\Model\ISearchRequest::setMetaTags($tags)
Limit the search to an array of meta tags.
Source:

lib/public/FullTextSearch/Model/ISearchRequest.php#197

Parameters:
  • $tags (array)
Since:

15.0.0

Returns:

\OCP\FullTextSearch\Model\ISearchRequest

public OCP\FullTextSearch\Model\ISearchRequest::addSubTag($source, $tag)
Limit the search to a specific sub tag.
Source:

lib/public/FullTextSearch/Model/ISearchRequest.php#210

Parameters:
  • $source (string)
  • $tag (string)
Since:

15.0.0

Returns:

\OCP\FullTextSearch\Model\ISearchRequest

public OCP\FullTextSearch\Model\ISearchRequest::getSubTags($formatted)
Get the sub tags the search is limited to.
Source:

lib/public/FullTextSearch/Model/ISearchRequest.php#221

Parameters:
  • $formatted (bool)
Since:

15.0.0

Returns:

array

public OCP\FullTextSearch\Model\ISearchRequest::setSubTags($tags)
Limit the search to an array of sub tags.
Source:

lib/public/FullTextSearch/Model/ISearchRequest.php#232

Parameters:
  • $tags (array)
Since:

15.0.0

Returns:

\OCP\FullTextSearch\Model\ISearchRequest

public OCP\FullTextSearch\Model\ISearchRequest::addLimitField($field)
Limit the search to a specific field of the mapping, using a full string.
Source:

lib/public/FullTextSearch/Model/ISearchRequest.php#244

Parameters:
  • $field (string)
Since:

15.0.0

Returns:

\OCP\FullTextSearch\Model\ISearchRequest

public OCP\FullTextSearch\Model\ISearchRequest::getLimitFields()
Get the fields the search is limited to.
Source:lib/public/FullTextSearch/Model/ISearchRequest.php#253
Since:15.0.0
Returns:array
public OCP\FullTextSearch\Model\ISearchRequest::addWildcardField($field)
Limit the search to a specific field of the mapping, using a wildcard on
the search string.
Source:

lib/public/FullTextSearch/Model/ISearchRequest.php#266

Parameters:
  • $field (string)
Since:

15.0.0

Returns:

\OCP\FullTextSearch\Model\ISearchRequest

public OCP\FullTextSearch\Model\ISearchRequest::getWildcardFields()
Get the limit to field of the mapping.
Source:lib/public/FullTextSearch/Model/ISearchRequest.php#275
Since:15.0.0
Returns:array
public OCP\FullTextSearch\Model\ISearchRequest::addRegexFilters($filters)
Filter the results, based on a group of field, using regex
Source:

lib/public/FullTextSearch/Model/ISearchRequest.php#287

Parameters:
  • $filters (array)
Since:

15.0.0

Returns:

\OCP\FullTextSearch\Model\ISearchRequest

public OCP\FullTextSearch\Model\ISearchRequest::getRegexFilters()
Get the regex filters the search is limit to.
Source:lib/public/FullTextSearch/Model/ISearchRequest.php#296
Since:15.0.0
Returns:array
public OCP\FullTextSearch\Model\ISearchRequest::addWildcardFilter($filter)
Filter the results, based on a group of field, using wildcard
Source:

lib/public/FullTextSearch/Model/ISearchRequest.php#308

Parameters:
  • $filter (array)
Since:

15.0.0

Returns:

\OCP\FullTextSearch\Model\ISearchRequest

public OCP\FullTextSearch\Model\ISearchRequest::getWildcardFilters()
Get the wildcard filters the search is limit to.
Source:lib/public/FullTextSearch/Model/ISearchRequest.php#317
Since:15.0.0
Returns:array
public OCP\FullTextSearch\Model\ISearchRequest::addField($field)
Add an extra field to the search.
Source:

lib/public/FullTextSearch/Model/ISearchRequest.php#329

Parameters:
  • $field (string)
Since:

15.0.0

Returns:

\OCP\FullTextSearch\Model\ISearchRequest

public OCP\FullTextSearch\Model\ISearchRequest::getFields()
Get the list of extra field to search into.
Source:lib/public/FullTextSearch/Model/ISearchRequest.php#338
Since:15.0.0
Returns:array
public OCP\FullTextSearch\Model\ISearchRequest::addSimpleQuery($query)
Add a MUST search on an extra field
Source:

lib/public/FullTextSearch/Model/ISearchRequest.php#350

Parameters:
Returns:

\OCP\FullTextSearch\Model\ISearchRequest

Since:

17.0.0

public OCP\FullTextSearch\Model\ISearchRequest::getSimpleQueries()
Get the list of queries on extra field.
Source:lib/public/FullTextSearch/Model/ISearchRequest.php#359
Returns:\OCP\FullTextSearch\Model\ISearchRequestSimpleQuery[]
Since:17.0.0