Skip to content

Commit edd6599

Browse files
committed
BUGFIX: Remove _type matching from MLT query
1 parent d9e595a commit edd6599

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

Classes/Eel/ElasticSearchQueryBuilder.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -752,9 +752,7 @@ public function moreLikeThis(array $like, array $fields = [], array $options = [
752752
$getDocumentDefinitionByNode = function (QueryInterface $request, NodeInterface $node): array {
753753
$request->queryFilter('term', ['__identifier' => $node->getIdentifier()]);
754754
$response = $this->elasticSearchClient->getIndex()->request('GET', '/_search', [], $request->toArray())->getTreatedContent();
755-
756755
$respondedDocuments = Arrays::getValueByPath($response, 'hits.hits');
757-
758756
if (count($respondedDocuments) === 0) {
759757
$this->logger->info(sprintf('The node with identifier %s was not found in the elasticsearch index.', $node->getIdentifier()), LogEnvironment::fromMethodName(__METHOD__));
760758
return [];
@@ -763,7 +761,6 @@ public function moreLikeThis(array $like, array $fields = [], array $options = [
763761
$respondedDocument = current($respondedDocuments);
764762
return [
765763
'_id' => $respondedDocument['_id'],
766-
Mapping::NEOS_TYPE_FIELD => $respondedDocument[Mapping::NEOS_TYPE_FIELD],
767764
'_index' => $respondedDocument['_index'],
768765
];
769766
};

0 commit comments

Comments
 (0)