Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support search indexing and searching for multi-instance fields #13991

Open
wants to merge 4 commits into
base: 5.x
Choose a base branch
from

Conversation

i-just
Copy link
Contributor

@i-just i-just commented Dec 5, 2023

Description

We can no longer rely solely on the one-to-one relationship between the field handle and fieldId.

  • Added a migration that adds the layoutElementUid column to the searchindex table.
  • Updated primary key to factor in that new column.
  • Updated the indexing logic to store the layoutElementUid.
  • Updated the search logic to rely primarily on the layoutElementUid and fall back on the fieldId.

Upgrade impact:
When updating from c4 to c5, after all migrations are run, a resave command with update search index param should be run for all element types that have custom field layouts (e.g. craft resave/entries --update-search-index=1, craft resave/addresses --update-search-index=1 etc.). This is so that layoutElementId is populated in the searchindex table. This is needed to support the indexing and searching through the multi-instance fields.

Related issues

#13987

@i-just i-just requested a review from brandonkelly December 5, 2023 11:41
@i-just i-just marked this pull request as draft December 5, 2023 11:56
@i-just i-just marked this pull request as ready for review December 6, 2023 08:51
@i-just i-just marked this pull request as draft December 6, 2023 09:35
@i-just i-just marked this pull request as ready for review December 6, 2023 09:58
…-instance-fields

# Conflicts:
#	src/config/app.php
brandonkelly added a commit that referenced this pull request Dec 27, 2023
Still may want to do #13991 though
@brandonkelly brandonkelly changed the base branch from 5.0 to 5.x March 26, 2024 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants