summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2019-01-31 11:23:15 +0100
committerGitHub <noreply@github.com>2019-01-31 11:23:15 +0100
commit54a97300e79d3d0c00a674bea1c32df22ee20c83 (patch)
tree2d62157a0f2cc8e047e42bd1385d1dccc82e5c6a
parent5c23f975d271f0689a86f220977954aed2777a09 (diff)
parente87e93debf2a077dd34e31e5c83a5fba1a3facb5 (diff)
downloadnextcloud-server-54a97300e79d3d0c00a674bea1c32df22ee20c83.tar.gz
nextcloud-server-54a97300e79d3d0c00a674bea1c32df22ee20c83.zip
Merge pull request #13894 from nextcloud/feature/noid/chunk-indexable-documents
Allow provider to returns indexeable documents by chunks
-rw-r--r--lib/public/FullTextSearch/IFullTextSearchProvider.php22
1 files changed, 21 insertions, 1 deletions
diff --git a/lib/public/FullTextSearch/IFullTextSearchProvider.php b/lib/public/FullTextSearch/IFullTextSearchProvider.php
index 890b57d84c9..a46ef051491 100644
--- a/lib/public/FullTextSearch/IFullTextSearchProvider.php
+++ b/lib/public/FullTextSearch/IFullTextSearchProvider.php
@@ -164,6 +164,24 @@ interface IFullTextSearchProvider {
/**
+ * Allow the provider to generate a list of chunk to split a huge list of
+ * indexable documents
+ *
+ * During the indexing the generateIndexableDocuments method will be called
+ * for each entry of the returned array.
+ * If the returned array is empty, the generateIndexableDocuments() will be
+ * called only once (per user).
+ *
+ * @since 16.0.0
+ *
+ * @param string $userId
+ *
+ * @return string[]
+ */
+ public function generateChunks(string $userId): array;
+
+
+ /**
* Returns all indexable document for a user as an array of IndexDocument.
*
* There is no need to fill each IndexDocument with content; at this point,
@@ -179,12 +197,14 @@ interface IFullTextSearchProvider {
* @see IndexDocument
*
* @since 15.0.0
+ * -> 16.0.0: the parameter "$chunk" was added
*
* @param string $userId
+ * @param string $chunk
*
* @return IndexDocument[]
*/
- public function generateIndexableDocuments(string $userId): array;
+ public function generateIndexableDocuments(string $userId, string $chunk): array;
/**