File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
app/code/Magento/Elasticsearch/Elasticsearch5/SearchAdapter Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -89,8 +89,7 @@ public function __construct(
89
89
AggregationBuilder $ aggregationBuilder ,
90
90
\Magento \Elasticsearch \SearchAdapter \QueryContainerFactory $ queryContainerFactory ,
91
91
LoggerInterface $ logger = null
92
- )
93
- {
92
+ ) {
94
93
$ this ->connectionManager = $ connectionManager ;
95
94
$ this ->mapper = $ mapper ;
96
95
$ this ->responseFactory = $ responseFactory ;
@@ -110,13 +109,15 @@ public function query(RequestInterface $request)
110
109
$ aggregationBuilder = $ this ->aggregationBuilder ;
111
110
$ query = $ this ->mapper ->buildQuery ($ request );
112
111
$ aggregationBuilder ->setQuery ($ this ->queryContainerFactory ->create (['query ' => $ query ]));
112
+
113
113
try {
114
114
$ rawResponse = $ client ->query ($ query );
115
115
} catch (\Exception $ e ) {
116
116
$ this ->logger ->critical ($ e );
117
117
// return empty search result in case an exception is thrown from Elasticsearch
118
118
$ rawResponse = self ::$ emptyRawResponse ;
119
119
}
120
+
120
121
$ rawDocuments = isset ($ rawResponse ['hits ' ]['hits ' ]) ? $ rawResponse ['hits ' ]['hits ' ] : [];
121
122
$ queryResponse = $ this ->responseFactory ->create (
122
123
[
You can’t perform that action at this time.
0 commit comments