Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions lib/public/FullTextSearch/Model/BodyPortion.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<?php

declare(strict_types=1);

/**
* SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

namespace OCP\FullTextSearch\Model;

Comment thread
madbob marked this conversation as resolved.
/**
* Body portion to be retrieved from the index.
*
* @since 35.0.0
*/
enum BodyPortion: string {
/**
* @since 35.0.0
*/
case TITLE = 'title';
Comment thread
madbob marked this conversation as resolved.

/**
* @since 35.0.0
*/
case LINKS = 'links';

/**
* @since 35.0.0
*/
case TAGS = 'tags';

/**
* @since 35.0.0
*/
case SUBTAGS = 'subtags';

/**
* @since 35.0.0
*/
case METATAGS = 'metatags';

/**
* @since 35.0.0
*/
case PARTS = 'parts';

/**
* @since 35.0.0
*/
case MORE = 'more';
}
16 changes: 16 additions & 0 deletions lib/public/FullTextSearch/Model/ISearchRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,22 @@ public function getSubTags(bool $formatted): array;
*/
public function setSubTags(array $tags): ISearchRequest;

/**
* Add a portion of data to be retrieved from the index.
*
* @since 35.0.0
*/
public function addPortion(BodyPortion $portion): ISearchRequest;

/**
* Get the portions of data to be retrieved from the index.
*
* @since 35.0.0
*
* @return list<string>
*/
public function getPortions(): array;

/**
* Limit the search to a specific field of the mapping, using a full string.
*
Expand Down
Loading