From 1a1b3e20e470a945dd9f5fab1d99174b10cbb141 Mon Sep 17 00:00:00 2001 From: "John Molakvoæ (skjnldsv)" Date: Mon, 3 Aug 2020 12:54:37 +0200 Subject: Fix unified search MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ (skjnldsv) Signed-off-by: npmbuildbot[bot] --- lib/private/Search/SearchComposer.php | 9 ++++++--- lib/private/Search/SearchQuery.php | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'lib/private/Search') 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; -- cgit v1.2.3