We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 54dd201 commit 759b26aCopy full SHA for 759b26a
tests/Functional/Search/SearchQueryTest.php
@@ -49,6 +49,23 @@ public function testSortBy(): void
49
$this->assertDocumentIds([1, 150, 319]);
50
}
51
52
+ public function testSelect(): void
53
+ {
54
+ $this->testing->select(['product_id'])->take(1);
55
+ $result = $this->testing->get();
56
+
57
+ $this->assertEquals(1, $result[0]['_source']['product_id']);
58
+ $this->assertArrayNotHasKey('name', $result[0]['_source']);
59
+ }
60
61
+ public function testExclude(): void
62
63
+ $this->testing->exclude(['product_id'])->take(1);
64
65
66
+ $this->assertArrayNotHasKey('product_id', $result[0]['_source']);
67
68
69
public function testSortByNested(): void
70
{
71
$filter = function (BoolQuery $query) {
0 commit comments