Skip to content
Open
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
24 changes: 24 additions & 0 deletions lib/Model/SearchRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -79,6 +80,9 @@ class SearchRequest implements ISearchRequest, JsonSerializable {
/** @var array */
private $simpleQueries = [];

/** @var list<string> */
private array $portions = [];


/**
* SearchRequest constructor.
Expand Down Expand Up @@ -691,6 +695,26 @@ public function getSimpleQueries(): array {
}


/**
* @param BodyPortion $portion
*
* @return ISearchRequest
*/
Comment on lines +698 to +702

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/**
* @param BodyPortion $query
*
* @return ISearchRequest
*/

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why to completely remove this comment? It is not useful, just as all other doc comment in this class...

public function addPortion(BodyPortion $portion): ISearchRequest {
$this->portions[] = $portion->value;

return $this;
}


/**
* @return list<string>
*/
public function getPortions(): array {
return $this->portions;
}


/**
* @return array
*/
Expand Down