Skip to content

Commit b964d3a

Browse files
committed
remove hardcoded index definition
1 parent 7c1587f commit b964d3a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/DsElasticSearchBundle/OutputChannel/SearchOutputChannel.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,10 @@ public function getResult(SearchContainerInterface $searchContainer): SearchCont
120120
return $searchContainer;
121121
}
122122

123-
$client = $this->clientBuilder->build($this->outputChannelContext->getIndexProviderOptions());
124-
$queryService = new IndexQueryService($client, $this->outputChannelContext->getIndexProviderOptions());
125-
126123
$runtimeOptions = $this->outputChannelContext->getRuntimeOptions();
124+
$indexProviderOptions = $this->outputChannelContext->getIndexProviderOptions();
125+
126+
$client = $this->clientBuilder->build($this->outputChannelContext->getIndexProviderOptions());
127127

128128
$currentPage = is_numeric($runtimeOptions['current_page']) ? (int) $runtimeOptions['current_page'] : 1;
129129
$limit = $this->options['result_limit'] > 0 ? $this->options['result_limit'] : 10;
@@ -138,7 +138,7 @@ public function getResult(SearchContainerInterface $searchContainer): SearchCont
138138
$query->setSize($limit);
139139

140140
$params = [
141-
'index' => 'default',
141+
'index' => $indexProviderOptions['index']['identifier'],
142142
'body' => $query->toArray(),
143143
];
144144

0 commit comments

Comments
 (0)