summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMaxence Lange <maxence@artificial-owl.com>2019-01-29 16:53:49 -0100
committerMaxence Lange <maxence@artificial-owl.com>2019-01-29 16:53:49 -0100
commitadde9a685ccd57f515a556004af6cf26d2f39ba6 (patch)
treebeb3eaedf50079594cb1550e54ee9844a63fa9a0 /lib
parent050b9135d50f57c777c157bb7aa8c102524b2c77 (diff)
downloadnextcloud-server-adde9a685ccd57f515a556004af6cf26d2f39ba6.tar.gz
nextcloud-server-adde9a685ccd57f515a556004af6cf26d2f39ba6.zip
+generateChunks()
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/public/FullTextSearch/IFullTextSearchProvider.php23
1 files changed, 21 insertions, 2 deletions
diff --git a/lib/public/FullTextSearch/IFullTextSearchProvider.php b/lib/public/FullTextSearch/IFullTextSearchProvider.php
index 890b57d84c9..a1bb14bdee0 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 array
+ */
+ 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,
@@ -178,13 +196,14 @@ interface IFullTextSearchProvider {
*
* @see IndexDocument
*
- * @since 15.0.0
+ * @since 16.0.0
*
* @param string $userId
+ * @param string $chunk
*
* @return IndexDocument[]
*/
- public function generateIndexableDocuments(string $userId): array;
+ public function generateIndexableDocuments(string $userId, string $chunk = ''): array;
/**