Skip to content

Commit 5b8d62a

Browse files
committed
Add complexSearch from @xpress7
1 parent f64ef44 commit 5b8d62a

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/ElasticquentTrait.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,15 @@ public static function searchByQuery($query = null, $aggregations = null, $sourc
269269
return new ResultCollection($result, $instance = new static);
270270
}
271271

272+
public static function complexSearch($params)
273+
{
274+
$instance = new static;
275+
276+
$result = $instance->getElasticSearchClient()->search($params);
277+
278+
return new ResultCollection($result, $instance = new static);
279+
}
280+
272281
/**
273282
* Search
274283
*
@@ -581,4 +590,4 @@ public function newFromHitBuilder($hit = array())
581590

582591
return $instance;
583592
}
584-
}
593+
}

0 commit comments

Comments
 (0)