-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Search vector generation does not support fields behind a WorkspaceGate #9850
Comments
Hi thanks lucas I will take a look ! |
Hi @eliasylonen Instead, I think we should only add the new field to the search vector configuration if it exists:
what do you think? It also makes me realize we will probably need to run a command to re-generate the search vector fields for the existing metadata when we enable isRichTextV2Enabled as this is not dealt with by sync. I can help with that! |
I think we can't access the value of What about renaming the configuration to something like Maybe a quick call with you and @Weiko? |
@eliasylonen understood, I think maybe we can keep the configuration as it is today for now (we can even remove |
if that's unclear we can have a call yes |
@ijreilly Is it possible to filter the array in |
Can we also chose to not add this new field type to the search and remove the search for the old body field also and create a separate issue for this problem ? That would remove a feature but since it seems to not work well right now, maybe that's a good trade-off ? |
I think So I think yes it could be good to remove the existing body search feature. I think it could be nice to filter the array in |
Description
When a field is gated behind a feature flag using the
WorkspaceGate
decorator, the columns for the field are correctly not created in the database. However, if the field is included in search field configuration (e.g.SEARCH_FIELDS_FOR_NOTES
),database:reset
fails when the feature flag is disabled.Steps to Reproduce
Create a feature flag, e.g.
IsRichTextV2Enabled
In
note.workspace-entity.ts
, add a feature-gated field usingWorkspaceGate
decorator:bodyV2
field to the search field configuration:npx nx run twenty-server:database:reset
An SQL query fails because the database column for the feature gated field doesn't exist:
Possible Solutions
WorkspaceGate
.WorkspaceGate
when the feature flag is disabled for the workspace.The text was updated successfully, but these errors were encountered: