From d70f7e00efea97e19e1289928b68d96543b25c5a Mon Sep 17 00:00:00 2001 From: james Date: Mon, 24 Jan 2022 10:26:36 +0000 Subject: [PATCH] fix: replace deprecated type field for ES 6.0 --- src/QueryGrammar.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/QueryGrammar.php b/src/QueryGrammar.php index 853a45e..6f8818a 100644 --- a/src/QueryGrammar.php +++ b/src/QueryGrammar.php @@ -256,10 +256,11 @@ protected function applyWhereRelationship(Builder $builder, array $where, string $compiled = $this->compileWheres($where['value']); $relationshipFilter = 'has_' . $relationship; + $relationshipType = $relationship . '_type'; $query = [ $relationshipFilter => [ - 'type' => $where['documentType'], + $relationshipType => $where['documentType'], 'query' => $compiled['query'], ], ];