Skip to content

Commit 69f30aa

Browse files
author
Kapitanov Andrey
committed
V7 sort by array
1 parent 0aa2eb1 commit 69f30aa

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Contracts/SortableQuery.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace Ensi\LaravelElasticQuery\Contracts;
44

55
use Closure;
6+
use Ensi\LaravelElasticQuery\Scripts\Script;
67

78
interface SortableQuery extends BoolQuery
89
{
@@ -19,4 +20,8 @@ public function sumSortBy(string $field, string $order = SortOrder::ASC): static
1920
public function medianSortBy(string $field, string $order = SortOrder::ASC): static;
2021

2122
public function sortByNested(string $field, Closure $callback): static;
23+
24+
public function sortByScript(Script $script, string $type = ScriptSortType::NUMBER, string $order = SortOrder::ASC): static;
25+
26+
public function sortByCustomArray(string $field, array $items): static;
2227
}

0 commit comments

Comments
 (0)