Skip to content

Commit 4e5e9d0

Browse files
authored
Merge pull request #68 from integer-net/missing-total-response-field
Add total field to response
2 parents ed7891e + 17305d4 commit 4e5e9d0

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

main/src/Model/Search/Adapter/ResponseWithProductIds.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ public function toArray()
5050
$response = [
5151
'aggregations' => $this->aggregationsFromSolrResponse(),
5252
'documents' => $this->documentsFromSolrResponse(),
53+
'total' => $this->solrResponse->documents()->count(),
5354
];
5455
return $response;
5556
}

main/test/unit/Model/Search/Adapter/ResponseTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ public static function dataResponseAsArray()
122122
],
123123
],
124124
],
125+
'total' => 3,
125126
]
126127
]
127128
];

0 commit comments

Comments
 (0)