Documentation

all.php

Table of Contents

Functions

HookTypesense_searchAllExternal_search()  : array<string|int, mixed>|false
Intercept ResourceSpace searches and optionally handle them using Typesense.
HookTypesense_searchAllBeforenodedelete()  : void
Store resources using a node before the node is deleted.
HookTypesense_searchAllAfternodedelete()  : void
Reindex resources that used a node after the node has been deleted.
HookTypesense_searchAllAftersaveresourcedata()  : false
Reindex resource after metadata has been saved.
HookTypesense_searchAllAfter_save_related_keywords()  : false
Sync Typesense related keyword synonyms after related keywords have been saved.

Functions

Intercept ResourceSpace searches and optionally handle them using Typesense.

HookTypesense_searchAllExternal_search(string $search, array<string|int, mixed> $keywords, array<string|int, mixed> $node_bucket, array<string|int, mixed> $node_bucket_not, mixed $restypes, mixed $order_by, array<string|int, mixed> $archive, mixed $fetchrows, string $sort, bool $access_override, bool $ignore_filters, bool $return_disk_usage, string $recent_search_daylimit, bool $return_refs_only, bool $editable_only, bool $returnsql, mixed $access, bool $smartsearch, PreparedStatementQuery $sql_filter, PreparedStatementQuery $sql_join, PreparedStatementQuery $select) : array<string|int, mixed>|false

Returning false allows normal MySQL-based ResourceSpace search processing to continue.

Parameters
$search : string

Original search string.

$keywords : array<string|int, mixed>

Parsed search keywords.

$node_bucket : array<string|int, mixed>

Included node search buckets.

$node_bucket_not : array<string|int, mixed>

Excluded node search buckets.

$restypes : mixed

Resource type filter.

$order_by : mixed

Requested sort field.

$archive : array<string|int, mixed>

Archive state filter.

$fetchrows : mixed

Result limit or chunk details.

$sort : string

Sort direction.

$access_override : bool

Whether access checks are overridden.

$ignore_filters : bool

Whether standard filters are ignored.

$return_disk_usage : bool

Whether disk usage totals are requested.

$recent_search_daylimit : string

Recent search day limit.

$return_refs_only : bool

Whether only resource refs should be returned.

$editable_only : bool

Whether only editable resources should be returned.

$returnsql : bool

Whether SQL should be returned instead of results.

$access : mixed

Access filter override.

$smartsearch : bool

Whether smart search mode is active.

$sql_filter : PreparedStatementQuery

Existing ResourceSpace filter SQL.

$sql_join : PreparedStatementQuery

Existing ResourceSpace JOIN SQL.

$select : PreparedStatementQuery

Existing ResourceSpace SELECT SQL.

Return values
array<string|int, mixed>|false

ResourceSpace-compatible search results, or false to fall back to core search.

HookTypesense_searchAllBeforenodedelete()

Store resources using a node before the node is deleted.

HookTypesense_searchAllBeforenodedelete(int $node) : void
Parameters
$node : int

Node ID.

HookTypesense_searchAllAfternodedelete()

Reindex resources that used a node after the node has been deleted.

HookTypesense_searchAllAfternodedelete(int $node) : void
Parameters
$node : int

Node ID.

HookTypesense_searchAllAftersaveresourcedata()

Reindex resource after metadata has been saved.

HookTypesense_searchAllAftersaveresourcedata() : false
Return values
false

Sync Typesense related keyword synonyms after related keywords have been saved.

HookTypesense_searchAllAfter_save_related_keywords(string $keyword, string $related) : false
Parameters
$keyword : string

Keyword that was updated.

$related : string

Related keyword string.

Return values
false
On this page

Search results