diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2020-08-03 12:54:37 +0200 |
---|---|---|
committer | npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com> | 2020-08-03 11:26:03 +0000 |
commit | 1a1b3e20e470a945dd9f5fab1d99174b10cbb141 (patch) | |
tree | aacff8872bcfd47685e9a9fb3e5e3a423e498f59 /lib/private/Search | |
parent | 4987fe9a51f0b889d2b99428c967014d95bb13ae (diff) | |
download | nextcloud-server-1a1b3e20e470a945dd9f5fab1d99174b10cbb141.tar.gz nextcloud-server-1a1b3e20e470a945dd9f5fab1d99174b10cbb141.zip |
Fix unified search
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
Diffstat (limited to 'lib/private/Search')
-rw-r--r-- | lib/private/Search/SearchComposer.php | 9 | ||||
-rw-r--r-- | lib/private/Search/SearchQuery.php | 2 |
2 files changed, 7 insertions, 4 deletions
diff --git a/lib/private/Search/SearchComposer.php b/lib/private/Search/SearchComposer.php index 61bbbbc969b..dd4edfc5f40 100644 --- a/lib/private/Search/SearchComposer.php +++ b/lib/private/Search/SearchComposer.php @@ -106,9 +106,9 @@ class SearchComposer { } /** - * Get a list of all provider IDs for the consecutive calls to `search` + * Get a list of all provider IDs & Names for the consecutive calls to `search` * - * @return string[] + * @return array */ public function getProviders(): array { $this->loadLazyProviders(); @@ -118,7 +118,10 @@ class SearchComposer { */ return array_values( array_map(function (IProvider $provider) { - return $provider->getId(); + return [ + 'id' => $provider->getId(), + 'name' => $provider->getName() + ]; }, $this->providers)); } diff --git a/lib/private/Search/SearchQuery.php b/lib/private/Search/SearchQuery.php index 2ed31fed441..186b4ccf18f 100644 --- a/lib/private/Search/SearchQuery.php +++ b/lib/private/Search/SearchQuery.php @@ -28,7 +28,7 @@ namespace OC\Search; use OCP\Search\ISearchQuery; class SearchQuery implements ISearchQuery { - public const LIMIT_DEFAULT = 20; + public const LIMIT_DEFAULT = 5; /** @var string */ private $term; |