All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m12s
Replace JSON-string embeddings with native pgvector(1536) storage and add PostgreSQL full-text search (tsvector/GIN) with Reciprocal Rank Fusion for hybrid keyword + semantic ranking. Changes: - NoteEmbedding.embedding: String → vector(1536) via pgvector - NoteEmbedding: added updatedAt for reindex tracking - Note: added tsv (tsvector) with auto-update trigger for FTS - semantic-search.service: hybrid FTS + vector search with RRF fusion - embedding.service: toVectorString() for pgvector SQL literals - Removed JS-side cosine similarity loops (now DB-side via <=>) - Added HNSW index on NoteEmbedding.embedding (cosine distance) - Added GIN index on Note.tsv for FTS queries Schema migration in: prisma/migrations/20260512120000_pgvector_and_fts_search/ Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
63 lines
2.9 KiB
TypeScript
63 lines
2.9 KiB
TypeScript
import { Carnet, Note } from './types';
|
|
|
|
export const CARNETS: Carnet[] = [
|
|
{ id: '1', name: 'Daily Notes', initial: 'D', type: 'Private', isPrivate: true },
|
|
{ id: '2', name: 'Project: Neo', initial: 'P', type: 'Project' },
|
|
{ id: '3', name: 'Shared Docs', initial: 'S', type: 'Shared' },
|
|
{ id: '4', name: 'Architecture Research', initial: 'A', type: 'Project' },
|
|
{ id: '5', name: 'History of Architecture', initial: 'H', type: 'Project', parentId: '4' },
|
|
{ id: '6', name: 'Modernism', initial: 'M', type: 'Project', parentId: '5' },
|
|
{ id: '7', name: 'Sustainable Design', initial: 'S', type: 'Project', parentId: '4' },
|
|
];
|
|
|
|
export const ALL_NOTES: Note[] = [
|
|
{
|
|
id: 'n1',
|
|
carnetId: '4',
|
|
title: 'Grid Systems',
|
|
date: 'Oct 26, 2024',
|
|
content: 'Grid Systems is streathen in ognitiacs clesign and simulhere desipmalt: complded structurer and manamateriai-s: ci arevenuatingly used, asiller straterty of insaee to the tmn and usaes of disrension, architecture of emiornabious tracious structures.',
|
|
imageUrl: 'https://images.unsplash.com/photo-1503387762-592dea58ef23?auto=format&fit=crop&q=80&w=800&h=600',
|
|
tags: [
|
|
{ id: 't1', label: 'Architecture', type: 'user' },
|
|
{ id: 't2', label: 'Systems', type: 'ai' }
|
|
]
|
|
},
|
|
{
|
|
id: 'n2',
|
|
carnetId: '4',
|
|
title: 'Materiality',
|
|
date: 'Oct 24, 2024',
|
|
content: 'Materiality is combinated by relliaitic structureirs measure of plastics, natural, materials and priotical structures. Materialed coasts erabiocera alann light spaces and octicm employed design on thodolen of materiality, and tohlite tersev/ used in the gridin structures en obain materials, coms pathetic structure.',
|
|
imageUrl: 'https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?auto=format&fit=crop&q=80&w=800&h=600',
|
|
tags: [
|
|
{ id: 't3', label: 'Materials', type: 'user' },
|
|
{ id: 't4', label: 'Sustainabilty', type: 'ai' }
|
|
]
|
|
},
|
|
{
|
|
id: 'n3',
|
|
carnetId: '4',
|
|
title: 'Light & Space',
|
|
date: 'Oct 22, 2024',
|
|
content: 'Light & Space is a creaivity of light & Space inralicated in sizazant or dark crotrcning and netrescenations of avant trurme sivonpaltures for in inncr-en allimativefiting is cerriadating and sityle.',
|
|
imageUrl: 'https://images.unsplash.com/photo-1497366216548-37526070297c?auto=format&fit=crop&q=80&w=800&h=600',
|
|
tags: [
|
|
{ id: 't5', label: 'Lighting', type: 'user' },
|
|
{ id: 't6', label: 'Atmosphere', type: 'ai' }
|
|
]
|
|
},
|
|
{
|
|
id: 'n4',
|
|
carnetId: '2',
|
|
title: 'Neo-Brutalism study',
|
|
date: 'Sep 12, 2024',
|
|
content: 'Exploring the raw aesthetic of neo-brutalism in urban environments. Focus on concrete textures and massive forms.',
|
|
imageUrl: 'https://images.unsplash.com/photo-1518005020951-eccb494ad742?auto=format&fit=crop&q=80&w=800&h=600',
|
|
tags: [
|
|
{ id: 't7', label: 'Brutalism', type: 'user' },
|
|
{ id: 't8', label: 'Urban', type: 'ai' }
|
|
]
|
|
}
|
|
];
|