diff --git a/src/brainy.ts b/src/brainy.ts index b09aa189..c43cfcce 100644 --- a/src/brainy.ts +++ b/src/brainy.ts @@ -1603,7 +1603,8 @@ export class Brainy implements BrainyInterface { limit: params.limit, type: params.type, where: params.where, - service: params.service + service: params.service, + includeVFS: params.includeVFS // v4.4.0: Pass through VFS filtering }) } diff --git a/src/types/brainy.types.ts b/src/types/brainy.types.ts index 260be1e4..1f54622a 100644 --- a/src/types/brainy.types.ts +++ b/src/types/brainy.types.ts @@ -235,6 +235,7 @@ export interface SimilarParams { type?: NounType | NounType[] // Restrict to types where?: Partial // Additional filters service?: string // Multi-tenancy + includeVFS?: boolean // v4.4.0: Include VFS entities (default: false) } /** diff --git a/src/vfs/VirtualFileSystem.ts b/src/vfs/VirtualFileSystem.ts index a3ab2968..74e6b35a 100644 --- a/src/vfs/VirtualFileSystem.ts +++ b/src/vfs/VirtualFileSystem.ts @@ -954,7 +954,8 @@ export class VirtualFileSystem implements IVirtualFileSystem { type: [NounType.File, NounType.Document, NounType.Media], limit: options?.limit || 10, offset: options?.offset, - explain: options?.explain + explain: options?.explain, + includeVFS: true // v4.4.0: VFS search must include VFS entities! } // Add path filter if specified @@ -1001,7 +1002,8 @@ export class VirtualFileSystem implements IVirtualFileSystem { to: entityId, limit: options?.limit || 10, threshold: options?.threshold || 0.7, - type: [NounType.File, NounType.Document, NounType.Media] + type: [NounType.File, NounType.Document, NounType.Media], + includeVFS: true // v4.4.0: VFS similarity search must include VFS entities! }) return results.map(r => { @@ -2315,7 +2317,8 @@ export class VirtualFileSystem implements IVirtualFileSystem { ...query.where, vfsType: 'entity' }, - limit: query.limit || 100 + limit: query.limit || 100, + includeVFS: true // v4.4.0: VFS entity search must include VFS entities! } if (query.type) { diff --git a/src/vfs/semantic/projections/AuthorProjection.ts b/src/vfs/semantic/projections/AuthorProjection.ts index 4376c5fc..8c35781a 100644 --- a/src/vfs/semantic/projections/AuthorProjection.ts +++ b/src/vfs/semantic/projections/AuthorProjection.ts @@ -31,7 +31,8 @@ export class AuthorProjection extends BaseProjectionStrategy { vfsType: 'file', owner: authorName }, - limit: 1000 + limit: 1000, + includeVFS: true // v4.4.0: Must include VFS entities! } // Filter by filename if subpath specified @@ -58,7 +59,8 @@ export class AuthorProjection extends BaseProjectionStrategy { vfsType: 'file', owner: authorName }, - limit: 1000 + limit: 1000, + includeVFS: true // v4.4.0: Must include VFS entities! }) return this.extractIds(results) @@ -75,7 +77,8 @@ export class AuthorProjection extends BaseProjectionStrategy { vfsType: 'file', owner: { $exists: true } }, - limit + limit, + includeVFS: true // v4.4.0: Must include VFS entities! }) return results.map(r => r.entity as VFSEntity) diff --git a/src/vfs/semantic/projections/TagProjection.ts b/src/vfs/semantic/projections/TagProjection.ts index 24b6bbd6..97e737b2 100644 --- a/src/vfs/semantic/projections/TagProjection.ts +++ b/src/vfs/semantic/projections/TagProjection.ts @@ -31,7 +31,8 @@ export class TagProjection extends BaseProjectionStrategy { vfsType: 'file', tags: { contains: tagName } // BFO operator for array contains }, - limit: 1000 + limit: 1000, + includeVFS: true // v4.4.0: Must include VFS entities! } // Filter by filename if subpath specified @@ -58,7 +59,8 @@ export class TagProjection extends BaseProjectionStrategy { vfsType: 'file', tags: { contains: tagName } // BFO operator }, - limit: 1000 + limit: 1000, + includeVFS: true // v4.4.0: Must include VFS entities! }) return this.extractIds(results) @@ -74,7 +76,8 @@ export class TagProjection extends BaseProjectionStrategy { vfsType: 'file', tags: { exists: true } // BFO operator }, - limit + limit, + includeVFS: true // v4.4.0: Must include VFS entities! }) return results.map(r => r.entity as VFSEntity) diff --git a/src/vfs/semantic/projections/TemporalProjection.ts b/src/vfs/semantic/projections/TemporalProjection.ts index faf79d4c..ba83ff04 100644 --- a/src/vfs/semantic/projections/TemporalProjection.ts +++ b/src/vfs/semantic/projections/TemporalProjection.ts @@ -78,7 +78,8 @@ export class TemporalProjection extends BaseProjectionStrategy { lessEqual: endOfDay.getTime() // BFO operator } }, - limit: 1000 + limit: 1000, + includeVFS: true // v4.4.0: Must include VFS entities! }) return this.extractIds(results) @@ -95,7 +96,8 @@ export class TemporalProjection extends BaseProjectionStrategy { vfsType: 'file', modified: { greaterEqual: oneDayAgo } // BFO operator }, - limit + limit, + includeVFS: true // v4.4.0: Must include VFS entities! }) return results.map(r => r.entity as VFSEntity)