From e38cb45bf1770dfebd767027eace08b532637aae Mon Sep 17 00:00:00 2001 From: Maxence Lange Date: Wed, 19 Dec 2018 09:36:38 -0100 Subject: [PATCH 1/2] allow content provide to generate new Index Signed-off-by: Maxence Lange --- .../FullTextSearch/Service/IIndexService.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/public/FullTextSearch/Service/IIndexService.php b/lib/public/FullTextSearch/Service/IIndexService.php index c5d1b9b3bcf..b70c7eb965f 100644 --- a/lib/public/FullTextSearch/Service/IIndexService.php +++ b/lib/public/FullTextSearch/Service/IIndexService.php @@ -44,6 +44,20 @@ use OCP\FullTextSearch\Model\IIndex; interface IIndexService { + /** + * Create an Index + * + * @since 15.0.1 + * + * @param string $providerId + * @param string $documentId + * @param string $userId + * @param int $status + * @return IIndex + */ + public function createIndex(string $providerId, string $documentId, string $userId, int $status): IIndex; + + /** * Retrieve an Index from the database, based on the Id of the Provider * and the Id of the Document From 5557485abac05544d02916f478ca64ef3b22e5cc Mon Sep 17 00:00:00 2001 From: Maxence Lange Date: Wed, 19 Dec 2018 11:27:37 -0100 Subject: [PATCH 2/2] using the createIndex from FullTextSearchManager Signed-off-by: Maxence Lange --- lib/private/FullTextSearch/FullTextSearchManager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/private/FullTextSearch/FullTextSearchManager.php b/lib/private/FullTextSearch/FullTextSearchManager.php index 9a9b077cf23..444774fb4a7 100644 --- a/lib/private/FullTextSearch/FullTextSearchManager.php +++ b/lib/private/FullTextSearch/FullTextSearchManager.php @@ -166,7 +166,7 @@ class FullTextSearchManager implements IFullTextSearchManager { * @throws FullTextSearchAppNotAvailableException */ public function createIndex(string $providerId, string $documentId, string $userId, int $status = 0): IIndex { - return $this->getIndexService()->getIndex($providerId, $documentId); + return $this->getIndexService()->createIndex($providerId, $documentId, $userId, $status); }