From b86cec9bb7249ca8a9cb0fe0d39709874d50776f Mon Sep 17 00:00:00 2001 From: Roberto Guido Date: Sun, 2 Aug 2026 01:02:58 +0200 Subject: [PATCH] feat: specify portions of document to be passed from platform to provider Signed-off-by: Roberto Guido --- lib/Model/SearchRequest.php | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/lib/Model/SearchRequest.php b/lib/Model/SearchRequest.php index 06faf1ab..f9f306a1 100644 --- a/lib/Model/SearchRequest.php +++ b/lib/Model/SearchRequest.php @@ -11,6 +11,7 @@ use JsonSerializable; use OCA\FullTextSearch\Tools\Traits\TArrayTools; +use OCP\FullTextSearch\Model\BodyPortion; use OCP\FullTextSearch\Model\ISearchRequest; use OCP\FullTextSearch\Model\ISearchRequestSimpleQuery; @@ -79,6 +80,9 @@ class SearchRequest implements ISearchRequest, JsonSerializable { /** @var array */ private $simpleQueries = []; + /** @var list */ + private array $portions = []; + /** * SearchRequest constructor. @@ -691,6 +695,26 @@ public function getSimpleQueries(): array { } + /** + * @param BodyPortion $portion + * + * @return ISearchRequest + */ + public function addPortion(BodyPortion $portion): ISearchRequest { + $this->portions[] = $portion->value; + + return $this; + } + + + /** + * @return list + */ + public function getPortions(): array { + return $this->portions; + } + + /** * @return array */