import { LanceDBResource, MountMode, Workspace } from '@struktoai/mirage-node'
const fashion = new LanceDBResource({
config: {
uri: '/data/fashion.lancedb', // or s3://, gs://, db:// (LanceDB Cloud)
table: 'fashion',
groupBy: ['gender', 'articleType', 'baseColour'],
idColumn: 'id',
titleColumn: 'productDisplayName',
blobColumn: 'image_bytes',
blobExt: 'jpg',
vectorColumn: 'vector', // presence enables the search command
searchLimit: 5,
},
})
const ws = new Workspace({ '/fashion/': fashion }, { mode: MountMode.READ })
await ws.execute('ls /fashion/Men/Shoes/White')
await ws.execute('search "red running shoes" /fashion') // ranked paths + score + card