From 2b9bceb7733b8cbb31b3235efa8a7fac9ac60e48 Mon Sep 17 00:00:00 2001 From: Vidar Langseid Date: Mon, 10 Jun 2024 14:00:31 +0200 Subject: [PATCH 1/2] IBX-8378: Fieldtype must implement Indexable if using Solr --- .../BlockDocumentsContentFields.php | 2 +- .../ContentDocumentFulltextFields.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/FieldMapper/ContentTranslationFieldMapper/BlockDocumentsContentFields.php b/lib/FieldMapper/ContentTranslationFieldMapper/BlockDocumentsContentFields.php index cc6edab7d..de960d506 100644 --- a/lib/FieldMapper/ContentTranslationFieldMapper/BlockDocumentsContentFields.php +++ b/lib/FieldMapper/ContentTranslationFieldMapper/BlockDocumentsContentFields.php @@ -74,7 +74,7 @@ public function mapFields(Content $content, $languageCode) } foreach ($contentType->fieldDefinitions as $fieldDefinition) { - if ($fieldDefinition->id !== $field->fieldDefinitionId) { + if ($fieldDefinition->id !== $field->fieldDefinitionId || !$fieldDefinition->isSearchable) { continue; } diff --git a/lib/FieldMapper/ContentTranslationFieldMapper/ContentDocumentFulltextFields.php b/lib/FieldMapper/ContentTranslationFieldMapper/ContentDocumentFulltextFields.php index 6e63753c0..ddf4e4520 100644 --- a/lib/FieldMapper/ContentTranslationFieldMapper/ContentDocumentFulltextFields.php +++ b/lib/FieldMapper/ContentTranslationFieldMapper/ContentDocumentFulltextFields.php @@ -128,7 +128,7 @@ private function doMapFields(Content $content, ContentType $contentType, $langua } foreach ($contentType->fieldDefinitions as $fieldDefinition) { - if ($fieldDefinition->id !== $field->fieldDefinitionId) { + if ($fieldDefinition->id !== $field->fieldDefinitionId || !$fieldDefinition->isSearchable) { continue; } @@ -140,7 +140,7 @@ private function doMapFields(Content $content, ContentType $contentType, $langua continue; } - if (!$indexField->type instanceof FieldType\FullTextField || !$fieldDefinition->isSearchable) { + if (!$indexField->type instanceof FieldType\FullTextField) { continue; } From 559e48168823dfedd280725936077a769c4821b4 Mon Sep 17 00:00:00 2001 From: Vidar Langseid Date: Tue, 11 Jun 2024 12:05:16 +0200 Subject: [PATCH 2/2] Fixed phpstan error message --- ignore-lte-php7.4-errors.neon | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ignore-lte-php7.4-errors.neon b/ignore-lte-php7.4-errors.neon index 22e0ed626..c0a225bba 100644 --- a/ignore-lte-php7.4-errors.neon +++ b/ignore-lte-php7.4-errors.neon @@ -1,6 +1,6 @@ parameters: ignoreErrors: - - message: "#^Anonymous function should return array but returns array\\\\|false\\.$#" + message: "#^Anonymous function should return array\\ but returns array\\\\|false\\.$#" count: 1 path: tests/lib/Search/ResultExtractor/AggregationResultExtractor/TermAggregationResultExtractorTest.php