ISearchResult¶
-
interface
OCP\FullTextSearch\Model\
ISearchResult
¶ - Interface ISearchResultWhen a search request is initiated, FullTextSearch will create a SearchResultobject, based on this interface, containing the SearchRequest and the targetedContent Provider.The object will be passed to the Search Platform, which will proceed to thesearch and fill the SearchResult object with results.Then, the object will be passed to the targeted Content Provider that willimprove the Search Results with detailed informations.Finally, the SearchResult is returned to the original search request.
Source: lib/public/FullTextSearch/Model/ISearchResult.php#49
Methods¶
-
public
OCP\FullTextSearch\Model\ISearchResult::
getRequest
()¶ - Get the original SearchRequest.
Source: lib/public/FullTextSearch/Model/ISearchResult.php#61 See: \OCP\FullTextSearch\Model\ISearchRequest
Since: 15.0.0 Returns: \OCP\FullTextSearch\Model\ISearchRequest
-
public
OCP\FullTextSearch\Model\ISearchResult::
getProvider
()¶ - Get the targeted Content Provider.
Source: lib/public/FullTextSearch/Model/ISearchResult.php#70 Since: 15.0.0 Returns: \OCP\FullTextSearch\IFullTextSearchProvider
-
public
OCP\FullTextSearch\Model\ISearchResult::
addDocument
($document)¶ - Add an IIndexDocument as one of the result of the search request.
Source: Parameters: - $document (
OCP\FullTextSearch\Model\IIndexDocument
)
Since: 15.0.0
Returns: - $document (
-
public
OCP\FullTextSearch\Model\ISearchResult::
getDocuments
()¶ - Returns all result of the search request, in an array of IIndexDocument.
Source: lib/public/FullTextSearch/Model/ISearchResult.php#91 Since: 15.0.0 Returns: \OCP\FullTextSearch\Model\IIndexDocument[]
-
public
OCP\FullTextSearch\Model\ISearchResult::
setDocuments
($documents)¶ - Set an array of IIndexDocument as the result of the search request.
Source: Parameters: - $documents (
OCP\FullTextSearch\Model\IIndexDocument[]
)
Since: 15.0.0
Returns: - $documents (
-
public
OCP\FullTextSearch\Model\ISearchResult::
addAggregation
($category, $value, $count)¶ - Add an aggregation to the result.
Source: Parameters: - $category (string)
- $value (string)
- $count (int)
Since: 15.0.0
Returns:
-
public
OCP\FullTextSearch\Model\ISearchResult::
getAggregations
($category)¶ - Get all aggregations.
Source: Parameters: - $category (string)
Since: 15.0.0
Returns: array
-
public
OCP\FullTextSearch\Model\ISearchResult::
setRawResult
($result)¶ - Set the raw result of the request.
Source: Parameters: - $result (string)
Since: 15.0.0
Returns:
-
public
OCP\FullTextSearch\Model\ISearchResult::
setTotal
($total)¶ - Set the total number of results for the search request.Used by pagination.
Source: Parameters: - $total (int)
Since: 15.0.0
Returns:
-
public
OCP\FullTextSearch\Model\ISearchResult::
setMaxScore
($score)¶ - Set the top score for the search request.
Source: Parameters: - $score (int)
Since: 15.0.0
Returns:
-
public
OCP\FullTextSearch\Model\ISearchResult::
setTime
($time)¶ - Set the time spent by the request to perform the search.
Source: Parameters: - $time (int)
Since: 15.0.0
Returns:
-
public
OCP\FullTextSearch\Model\ISearchResult::
setTimedOut
($timedOut)¶ - Set to true if the request timed out.
Source: Parameters: - $timedOut (bool)
Since: 15.0.0
Returns: