Skip to content

Commit 31c66e9

Browse files
committed
TASK: Temporarily set the suggester field to fulltext.text
1 parent 6a9f364 commit 31c66e9

3 files changed

Lines changed: 7 additions & 3 deletions

File tree

Classes/Command/NodeIndexCommandController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ public function buildCommand(int $limit = null, bool $update = false, string $wo
224224
}
225225

226226
$postfix = (string)($postfix ?: time());
227-
$this->nodeIndexer->setIndexNamePostfix((string)$postfix);
227+
$this->nodeIndexer->setIndexNamePostfix($postfix);
228228

229229
$createMapping = function (array $dimensionsValues) use ($update, $postfix) {
230230
$this->executeInternalCommand('createInternal', [

Classes/Eel/ElasticSearchQueryBuilder.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ public function aggregation(string $name, array $aggregationDefinition, string $
466466
* @param string $name
467467
* @return ElasticSearchQueryBuilder
468468
*/
469-
public function termSuggestions(string $text, string $field = '_all', string $name = 'suggestions'): ElasticSearchQueryBuilder
469+
public function termSuggestions(string $text, string $field = '__fulltext.text', string $name = 'suggestions'): ElasticSearchQueryBuilder
470470
{
471471
$suggestionDefinition = [
472472
'text' => $text,
@@ -582,7 +582,7 @@ public function fetch(): array
582582
try {
583583
$timeBefore = microtime(true);
584584
$request = $this->request->getRequestAsJson();
585-
585+
\Neos\Flow\var_dump($request, __METHOD__ . ':' . __LINE__);
586586
$response = $this->elasticSearchClient->getIndex()->request('GET', '/_search', [], $request);
587587
$timeAfterwards = microtime(true);
588588

@@ -610,6 +610,7 @@ public function fetch(): array
610610
*/
611611
protected function evaluateResult(array $result): SearchResult
612612
{
613+
\Neos\Flow\var_dump($result['hits']['total'], __METHOD__ . ':' . __LINE__);
613614
return new SearchResult(
614615
$hits = $result['hits']['hits'] ?? [],
615616
$total = $result['hits']['total'] ?? 0

Classes/Eel/ElasticSearchQueryResult.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ public function __construct(ElasticSearchQuery $elasticSearchQuery)
4949
* Initialize the results by really executing the query
5050
*
5151
* @return void
52+
* @throws \Flowpack\ElasticSearch\ContentRepositoryAdaptor\Exception
53+
* @throws \Flowpack\ElasticSearch\Exception
54+
* @throws \Neos\Flow\Http\Exception
5255
*/
5356
protected function initialize(): void
5457
{

0 commit comments

Comments
 (0)