- Create ocr_text table for storing per-region OCR results - Add tsvector search_vector column to photos with GIN index and auto-update trigger on filename/user_title/user_notes - Implement ocr_photo Celery task using rapidocr-onnxruntime - Add FTS leg to hybrid search: queries photos.search_vector and ocr_text via UNION, fused with semantic results via RRF (k=60) Migration 0004 backfills search_vector for existing rows. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
21 lines
439 B
Python
21 lines
439 B
Python
"""
|
|
Database models for Mulita
|
|
"""
|
|
from app.models.photos import Photo
|
|
from app.models.folders import Folder, SourceRoot
|
|
from app.models.tags import Tag, PhotoTag
|
|
from app.models.heaps import Heap, HeapPhoto
|
|
from app.models.embeddings import Embedding
|
|
from app.models.ocr_text import OCRText
|
|
|
|
__all__ = [
|
|
'Photo',
|
|
'Folder',
|
|
'SourceRoot',
|
|
'Tag',
|
|
'PhotoTag',
|
|
'Heap',
|
|
'HeapPhoto',
|
|
'Embedding',
|
|
'OCRText',
|
|
] |