Repository navigation
Conversation
317d29b to
5c19bc9
Compare
5c19bc9 to
64bca55
Compare
64bca55 to
29c2f27
Compare
b3922d8 to
7a01108
Compare
7a01108 to
eabc420
Compare
eabc420 to
d13be08
Compare
4f736ff to
e0a74e7
Compare
| LanguageHandler $languageHandler, | ||
| JoinedTablesTracker $joinedTablesTracker | ||
| protected ContentTypeHandler $contentTypeHandler, | ||
| protected LanguageHandler $languageHandler, |
There was a problem hiding this comment.
Is $languageHandler still needed? Since the switch to LanguagePriorityConditionBuilder nothing in FieldBase or its subclasses reads it, same for SortClauseHandler\Field::$languageHandler. The constructors break anyway, so it could go together with the $languageHandler: args in criterion_handlers_common.yml and sort_clause_handlers_common.yml
| if (!isset($locations[$locationId])) { | ||
| $locations[$locationId] = new SPILocation(); | ||
| $locations[$locationId]->id = $locationId; | ||
| $locations[$locationId]->contentId = (int)$row['contentobject_id']; |
There was a problem hiding this comment.
Leftover from the version where the handler grouped translations by $location->contentId? Nothing reads it now, same line in HandlerLocationSortTest
| $locations[$locationId]->contentId = (int)$row['contentobject_id']; |
| use RuntimeException; | ||
|
|
||
| /** | ||
| * Adds "language_id" and "is_main_and_always_available" to "ibexa_search_object_word_link", backfilled from "language_mask". |
There was a problem hiding this comment.
The description still says the legacy search index needs a full reindex after upgrading, but per #942 (comment) the backfill is exact and no reindex is needed. Can you update it so nobody runs a full reindex for nothing?
| /** | ||
| * @param int|string|null $languageId | ||
| */ | ||
| protected function extractMatchedLanguage($languageId): ?string |
There was a problem hiding this comment.
Can this get a native type? The signature changes anyway. Also afaict matched_language_id can't be null anymore - both gateways fall back to c.initial_language_id, which is NOT NULL - so the null branch looks dead
ibexa_search_object_word_link gets language_id and is_main_and_always_available columns, filled from its mask. The field criteria and sort clause, the full-text and language code criteria and the language filter of content and location search use the join tables and those columns instead of arithmetic on the masks. The indexer keeps writing the word link mask until the bitmask is removed, and field language ids are compared without their always-available bit until it is stripped.
…ws instead of loading content translations
…pes in the legacy search classes
…spectTableByUnquotedName()
ReindexCommand passes the --content-ids values as strings, and the untyped remove() hands them on to SearchIndex's int parameters, which strict types turned into a TypeError for deleted or unpublished content.
… for the returned page only
e0a74e7 to
f837065
Compare
|



Note
Part 2 of 6 of the language bitmask removal. Each part is green on its own; the bitmask keeps being written until #946 removes it.
Related PRs:
The stack that replaces the language bitmask, bottom to top. Each part is green and can be merged on its own, in this order:
MaskGeneratoribexa/installer#246 goes first, as the Experience content it provisions has to match each step, and ibexa/installer#250 drops its schema checks after #946. ibexa/data-intelligence-layer#63 goes with #946.
Description:
The legacy search engine stops doing arithmetic on language ids.
FieldBaseand the field sort clause resolved the prioritized-language fallback with bit shifts, which only worked because ids were powers of two;LanguagePriorityConditionBuilderdoes it with correlated subqueries on the join tables instead. The language code and full-text criteria and the language filter of content and location search use the join tables too. Field language ids still carry the always-available bit until #946 strips it, so the builder compares them without it for now.ibexa_search_object_word_linkgetslanguage_idandis_main_and_always_availablecolumns, whichAddSearchObjectWordLinkLanguageIdColumnsMigrationfills from its mask.language_idis BIGINT, like the field and name language ids, since ids from the bitmask go up to 2^62. The indexer keeps writing the mask until #946. The index format changes with it, so the legacy search index needs a full reindex after upgrading.Search\Legacy\Content\Handler::extractMatchedLanguage()takes the language ids and the main language id instead of a mask.