forked from hkulekci/qdrant-php
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
查伟昌
committed
Nov 29, 2023
1 parent
109bd8b
commit 6f4d991
Showing
2 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
/** | ||
* ServerException | ||
* | ||
* @since Mar 2023 | ||
* @author Haydar KULEKCI <[email protected]> | ||
*/ | ||
|
||
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; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
/** | ||
* SearchParams | ||
* | ||
* @since Mar 2023 | ||
* @author Haydar KULEKCI <[email protected]> | ||
*/ | ||
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]; | ||
} | ||
} |
6f4d991
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @zwell, I see your contribution here for BatchRequest. Would you mind sending these changes to the
hkulekci/qdrant-php
repository as a PR if you test this use case? It would be perfect if we could do that.