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

Search #7237

Draft
wants to merge 41 commits into
base: main
Choose a base branch
from
Draft

Search #7237

wants to merge 41 commits into from

Conversation

ijreilly
Copy link
Collaborator

No description provided.

const filteredNewObjectMetadataItems = useMemo(() => {
return filterTsVectorFields(newObjectMetadataItems);
}, [newObjectMetadataItems]);

const [objectMetadataItems, setObjectMetadataItems] = useRecoilState(
Copy link
Member

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';
Copy link
Collaborator Author

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({
Copy link
Collaborator Author

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,
Copy link
Collaborator Author

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

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