UBERF-6540: Fix isIndexable and clean wrong indexed documents (#5347)

This commit is contained in:
Andrey Sobolev
2024-04-13 14:07:37 +07:00
committed by GitHub
parent 9e3c9a928e
commit bccf97eeb7
13 changed files with 246 additions and 181 deletions
+46 -27
View File
@@ -15,68 +15,69 @@
import {
type ActivityAttributeUpdatesPresenter,
type ActivityInfoMessage,
type ActivityDoc,
type ActivityExtension,
type ActivityExtensionKind,
type ActivityInfoMessage,
type ActivityMessage,
type ActivityMessageControl,
type ActivityMessageExtension,
type ActivityMessageExtensionKind,
type ActivityMessagePreview,
type ActivityMessagesFilter,
type ActivityReference,
type DocAttributeUpdates,
type DocUpdateAction,
type DocUpdateMessage,
type DocUpdateMessageViewlet,
type DocUpdateMessageViewletAttributesConfig,
type Reaction,
type TxViewlet,
type ActivityMessageControl,
type SavedMessage,
type IgnoreActivity,
type ActivityReference,
type ActivityMessagePreview
type Reaction,
type SavedMessage,
type TxViewlet
} from '@hcengineering/activity'
import contact, { type Person } from '@hcengineering/contact'
import core, {
DOMAIN_MODEL,
IndexKind,
type Account,
type Class,
type Doc,
type DocumentQuery,
type Ref,
type Tx,
IndexKind,
type TxCUD,
type Domain,
type Account,
type Timestamp
type IndexingConfiguration,
type Ref,
type Timestamp,
type Tx,
type TxCUD
} from '@hcengineering/core'
import {
Model,
type Builder,
Prop,
Index,
TypeRef,
TypeString,
Mixin,
ArrOf,
Collection,
Index,
Mixin,
Model,
Prop,
TypeBoolean,
TypeIntlString,
ArrOf,
TypeMarkup,
TypeRef,
TypeString,
TypeTimestamp,
UX,
TypeMarkup
type Builder
} from '@hcengineering/model'
import { TAttachedDoc, TClass, TDoc } from '@hcengineering/model-core'
import preference, { TPreference } from '@hcengineering/model-preference'
import view from '@hcengineering/model-view'
import notification from '@hcengineering/notification'
import type { Asset, IntlString, Resource } from '@hcengineering/platform'
import { type AnyComponent } from '@hcengineering/ui/src/types'
import contact, { type Person } from '@hcengineering/contact'
import preference, { TPreference } from '@hcengineering/model-preference'
import notification from '@hcengineering/notification'
import view from '@hcengineering/model-view'
import activity from './plugin'
export { activityOperation } from './migration'
export { activityId } from '@hcengineering/activity'
export { activityOperation } from './migration'
export const DOMAIN_ACTIVITY = 'activity' as Domain
@@ -369,6 +370,24 @@ export function createModel (builder: Builder): void {
labelPresenter: activity.component.ActivityMessageNotificationLabel
})
builder.mixin<Class<DocUpdateMessage>, IndexingConfiguration<DocUpdateMessage>>(
activity.class.DocUpdateMessage,
core.class.Class,
core.mixin.IndexConfiguration,
{
searchDisabled: true
}
)
builder.mixin<Class<DocUpdateMessage>, IndexingConfiguration<DocUpdateMessage>>(
activity.class.Reaction,
core.class.Class,
core.mixin.IndexConfiguration,
{
searchDisabled: true
}
)
builder.createDoc(
notification.class.NotificationType,
core.space.Model,