-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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 #7237
base: main
Are you sure you want to change the base?
Conversation
const filteredNewObjectMetadataItems = useMemo(() => { | ||
return filterTsVectorFields(newObjectMetadataItems); | ||
}, [newObjectMetadataItems]); | ||
|
||
const [objectMetadataItems, setObjectMetadataItems] = useRecoilState( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we don't need to listen on objectMetadataItems here as we only use it to conditionnally setObjectMetadataItems.
What we could do is to use a useRecoilCallback which enables us to do the setObjectMetadataItems and to check at the last moment what we have in objectMetadataItems without having the component listening to it (and therefore re-rendering)
@@ -0,0 +1,22 @@ | |||
import { MigrationInterface, QueryRunner } from 'typeorm'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Weiko can we check together how we want to do this?
@@ -136,4 +140,20 @@ export class CustomWorkspaceEntity extends BaseWorkspaceEntity { | |||
@WorkspaceIsNullable() | |||
@WorkspaceIsSystem() | |||
timelineActivities: TimelineActivityWorkspaceEntity[]; | |||
|
|||
@WorkspaceField({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For custom objects, searchVector column is created by service based on labelMetadataIdenfierFieldMetadataId.
Here in the workspace entity file we don't have access to that potential labelMetadataIdenfierFieldMetadataId (if Im not mistaken).
Running sync-metadata on existing workspaces will create the searchVector column based on the field "name" which is the default label metadata identifier field.
Another option would be not to have anything in this file and create a command to backfill existing workspaces, which we could do later since for now we don't have usecases. But this adds manual action while very little custom objects have a different (not name) label identifier I suppose
export function WorkspaceIndex( | ||
columns?: string[], | ||
columnsOrIndexType?: string[] | IndexType, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this signature too odd? @Weiko
No description provided.