diff --git a/src/Exception/UnknownException.php b/src/Exception/UnknownException.php new file mode 100644 index 0000000..da98907 --- /dev/null +++ b/src/Exception/UnknownException.php @@ -0,0 +1,36 @@ + + */ + +namespace Qdrant\Exception; + +use Qdrant\Response; +use RuntimeException; + +class UnknownException extends RuntimeException +{ + protected Response $response; + + /** + * @return Response + */ + public function getResponse(): Response + { + return $this->response; + } + + /** + * @param Response $response + * @return ServerException + */ + public function setResponse(Response $response): UnknowException + { + $this->response = $response; + + return $this; + } +} \ No newline at end of file diff --git a/src/Models/Request/SearchBatchRequest.php b/src/Models/Request/SearchBatchRequest.php new file mode 100644 index 0000000..2d1f399 --- /dev/null +++ b/src/Models/Request/SearchBatchRequest.php @@ -0,0 +1,30 @@ + + */ +namespace Qdrant\Models\Request; + +use Qdrant\Exception\InvalidArgumentException; +use Qdrant\Models\Filter\Filter; +use Qdrant\Models\PointStruct; +use Qdrant\Models\Traits\ProtectedPropertyAccessor; +use Qdrant\Models\VectorStruct; +use Qdrant\Models\VectorStructInterface; + +class SearchBatchRequest +{ + protected array $batchSearch = []; + + public function addSearch(SearchRequest $search): void + { + $this->batchSearch[] = $search->toArray(); + } + + public function toArray(): array + { + return ['searches' => $this->batchSearch]; + } +} \ No newline at end of file